This has to be a simple question again, but I just don’t get it - so thanks for your kind help!
I wrote a Lua script which works quite well and does a couple of things in one go. If I now want to only execute some parts of the script, I’d need to call it with some kind of flag parameter to tell the script what to execute and what not…
I need to bind the script calls to individual keyboard shortcuts, like: do the whole thing (default), do part A, do part B…
As for (1) you can ask for parameters when the script is instantiated
function action_params ()
-- return a table of possible parameters
end
function factory (params)
return function ()
-- the script is created with given parameters
end
end
Dear Robin, thank you very much for this explanation, this is absolutely great!
I simply didn’t know what to do with the instantiation parameters before; you helped me understand that this all makes sense once the script is added in the script manager!!