Scripting Action

Top  Previous  Next

This action creates a lua script action inside the action tree and allows for this script to run inside the normal tree flow. Please be aware that any code in this script is executed on the central processing thread and no new actions can trigger while it is running. Consider placing long running scripts on a separate thread.


Based on the return value from the script, either no return value, true or false. This action branches differently. If no value is returned no branching is performed. If true is returned tree processing will jump to the "True Node". If false is returned the branching will jump to the "False Node". After processing is complete on the "True Node" or "False Node" node event propagation will continue as normal.


Event Details

If your action needs access to the event details it can access these in the "event" global variable. This is a table with the following content.






The event string



The device id



The modifier of the event.


table of strings

A table with all payloads for this event.


The scripting language used in Girder is called Lua. More specifically Lua 5.1. You can find the Lua 5.1 manual here or a good book here. Lua by nature is a very extensible language and Girder has added a lot of functionality. You can find the details of this in the scripting chapter of this manual.