Execute Lua Function From File

The Execute Lua Function From File action executes a custom Lua function defined in a file in the Staging Browser. Since the Lua function is defined in a separate file, the function is easily updated without modifying the trigger. To execute a custom Lua script defined directly in the action, see Execute Lua Script.

Parameter descriptions

Parameter Description
Script File The name of your Lua script file in the Staging Browser. Scripts are usually placed in the /scripts directory. For example /scripts/sample.lua.
Function Name The name of the function you want to execute inside the script file. For example, if the function is declared as "function stringsplit()", you would use "stringsplit".
Input Variables Variables that will be passed into the Lua script when execution of the script begins. When an input variable is added using the Configure... Variables window, it is also added to the Input tab.
Output Variables Variables that will be returned by the Lua script when execution of the script ends. When an output variable is added using the Configure... Variables window, it is also added to the Output tab.

Input tab

Parameter Description
Input Variables Input variables will appear and can be mapped to variables when Input Variables parameters are added using the Configure... Variables window.

Output tab

Parameter Description
Output Variables Output variables will appear and can be mapped to variables when Output Variables parameters are added using the Configure... Variables window.
ReturnMessage A return message set by the Lua script. The script can return a numeric code or string.
ErrorMessage An error message set by the Lua script.

For additional information on the runtime's support of Lua, see Extending the system using Lua scripting. For a usage example of the Execute Lua Function From File action, see Executing a Lua function from a Lua script file.