zScript Objects

Various Lua functions return a reference to a zScript Object. There are several types of Objects (alias, variable, trigger, etc). Each one has it's own properties associated with that setting type.

However, all object references have the following common properties:

The name (or short IDname in some cases) of the object
The numeric index of the object with the list of settings. Can be used with the various "getxxx" functions to retrieve a specific object
Returns true if the Lua object still points to a valid zScript object. If the zScript object is deleted, isvalid will return false. Use this if it is possible for the object to have been deleted since the original pointer was obtained
Returns the Class Object that contains the given setting.
Returns the value assigned to the object. This might be a script (like with an alias), or just a value (like with a variable)
Can be used to enable or disable the setting. Returns the current enabled state (true/false).
Some settings have a short name and a long name. Use this to return the long name of a setting.
Returns the priority of a setting. Can be used to change the priority
Sets the user-defined note/comment field for each setting as shown in the Package Editor
this function prevents the object from being updated within TeSSH until a corresponding endupdate() function is called.
tells TeSSH that the Lua script is done changing the object and it should be refreshed within the TeSSH user interface.

Consult the sections about each specific Object type for details on object-specific properties.

Add comment

Login or register to post comments