JW Lua can be user configured to send specific parameters to the script. The user handles the parameters from JW Lua's Manager and the parameters will then be sent to the script both from JW Lua's Explorer, Finale's plug-in menu or in a Group Script. Script Parameters are optional.
JW Lua must know if the plug-in can handle parameters. This is done in the plug-in definition.
Put each info parameter on a separate line. The syntax is almost identical to finenv.UserInputValue() dialog boxes, except that there's generally no quotation marks around the strings and no {}
around lists.
Lists (except for NumberedList
items) and init values are optional for parameters.
A few lines of code are required to handle parameters sent to the script. Always make sure that the script can run without sent parameters as well.
-- Default values, if no parameters were sent to the script local resizestyle = 2 local relativeresize = true -- Check if parameters were sent to the script. -- If that's the case, use those values instead. local parameters = {...} if parameters[1] then resizestyle = parameters[1] end if parameters[2] then relativeresize = parameters[2] end