Script Manager

The Script Manager function allows you to manage embedded Lua scripts of objects in the system. Local copies of scripts can be saved and then edited using your choice of script editor. Any changes made to the local copy can then be synced back to the object by uploading the changes in the system. To access the Script Manager, open Options  Script Manager.

Script Manager Display
Figure 1. Script Manager Display

The Script Manager is a grid display where objects from the I/O model can be added. To add objects to the Script Manager, drag any object with an embedded Lua script onto the display. Alternatively, right-click on an object with an embedded Lua script and select Add item to > Script Manager from the context menu. Any object containing Lua scripts can be added to populate the columns of the table.

  • Object - Path to the Object

  • Property - Property name of the embedded script: If the property is script library, the name will have the following syntax: <PropertyName>:<LibraryName>

  • Local Path - Path to the local copy of the script file (the script file will only be created in the path location when the script is downloaded)

  • Info - Contains current status of script (this column will be populated when an action is performed)

Data can also be imported into the table by clicking on the import icon, and selecting an Excel, JSON or CSV file from disk.

Script Manager Display with Objects
Figure 2. Script Manager Display with Objects
Table 1. Script Manager Menu Bar Items
Element Action

icon import

Import an Excel, JSON or CSV file from disk into the table

icon export

Export the display contents into an Excel file

icon glasses

Check if any changes have been made to the local copy of the file (or the object). This will display a message in the Info column of the table. For further information, see the Verification of Changes section below.

icon upper limit1

Uploads the local copy of file and adds it to the object specified in the Object field of the table

icon lower limit1

Creates a local copy of the Lua script file in the location specified in the Local Path column

icon play

Enables auto-upload. For more information, see the auto-upload section below.

icon grid auto resize columns

Automatically resizes columns to fit content (shortcut: Ctrl+Alt+R)

Verification of Changes

Clicking on the "Verify" button icon glasses32 will display message(s) in the Info column of the table. Possible messages are:

  • "Success: File updated" - the script on local disk was changed

  • "Success: object updated"/"Object has been changed" - the script on the object was changed

  • "Success: object has not changed" - the script on the object was not changed

  • “No differences” – no changes were made

  • "File not found" – no local copy of the file yet (not downloaded)

Info Column of Script Manager Table
Figure 3. Info Column of Script Manager Table

Auto-upload

Clicking on the "Play" button will enable the auto-upload feature. When this feature is enabled, any updates to scripts on the file on disk will be automatically uploaded to the Lua script for the object in the system. The change will also be indicated in the Info column of the Script Manager table. Changes made to Lua scripts on the local disk when the feature is disabled will not be automatically uploaded to the script on the object in the system.

Auto-upload Button in Script Manager
Figure 4. Auto-upload Button in Script Manager