Passing data to installed scripts
An installed script, when it is run conventionally, always receives a single argument of table type.
Scripts installed via AddToMenu call (run from plugin menu or shortcut)
- The array part of the table contains the additional arguments specified in the
AddToMenucall. - The hash part of the table has the field
Fromthat contains either of the following strings: “config”, “dialog”, “editor”, “panels” or “viewer”. - In the case
From=="dialog", the table also has the fieldhDlg, that contains the dialog handle (a userdata value).
Scripts installed via AddCommand call (run via plugin command)
- The array part of the table contains the additional arguments specified in the
AddCommandcall followed by the command line arguments. - The hash part of the table has the field
Fromthat contains the string “panels”.