19.2.2. Demorize functions
In order to do some practical work in the scripts you have to communicate with the Demorize system. This is done through Demorize functions that are made available in the Lua language. This chapter list the functions that Demorize has provided to the language.
Writes a text to the Demorize log file. This function can be used for debugging your scripts.
- Message - The message to print to the log.
Converts a value written in decimal form into a hexadecimal string representation.
- Value - The decimal value to convert.
A hexadecimal representation of the value.
Converts a value written in hexadecimal form into a decimal string representation.
- Value - The hexadecimal value to convert.
A decimal representation of the value.
Returns a text where data source and variable references written in the input text are replaced with their current value.
- Text - A string that may contain references to data source items and variables within the written text.
A string where references has been substituted with their current value.
GX:GetProperty(TargetObject, "Property")
Gets a reference to an object's property. This reference can later be used in calls to the GX:SetProperty* functions. See Section 19.3, “Object Property Script Names” for information about the names of the objects' properties that can be supplied as the Property parameter to this call.
- TargetObject - The object from which to get the property reference. This argument takes the value that is supplied to the script through the SetTarget function.
- Property - The property to get a reference to.
A reference to the object's property.
GX:GetPropertyValue(Property)
Gets the value of a given object property.
- Property - Reference to the property for which to get the value. This is a reference retrieved by a call to the GX:GetProperty function.
The decimal value of the property.
GX:SetPropertyValue(Property, Value)
Sets the value of a given object property.
- Property - Reference to the property for which to set the value. This is a reference retrieved by a call to the GX:GetProperty function.
- Value - The decimal value to set.
GX:GetPropertyColor(Property)
Gets the color of a given object property. This function is used for properties that return color values.
- Property - Reference to the property for which to get the color. This is a reference retrieved by a call to the GX:GetProperty function.
The color value of the property.
GX:SetPropertyColor(Property, Color)
Sets the color of a given object property.
- Property - Reference to the property for which to set the color. This is a reference retrieved by a call to the GX:GetProperty function.
- Color - The color value to set.
Gets the reference to a given data source.
- Name - The name of the data source.
The data source reference.
GX:GetDataValue(DataSource, Item, Specifier)
Gets the value for a given data item.
- DataSource - The data source reference. This is a reference retrieved by a call to the GX:GetDataSource function.
- Item - The data item.
- Specifier - The data specifier or an empty string if not used.
GX:UpdateDataSource(DataSourceName, WaitUntilCompleted)
Trigger a content update of a data source.
- DataSourceName - The name of the data source to trigger and update for.
- WaitUntilCompleted - Tells if the update operation shall wait for the update to complete before continuing or not.
Gets the content of a file.
The file content as a string.
Checks if a file or directory exists or not.
- Path - The path to check.
true if the path exists, otherwise false.
Makes a HTTP GET request to the given URL.
The data returned in the HTTP response or nil if an error occurred.
Makes a REST API call to get data from a REST service.
- Url - The REST URL string.
The data returned from the REST service or nil if an error occurred.
Makes a REST API call to put data to a REST service.
- Url - The REST URL string.
- Data - The data to send.
Sets the authorization credentials to use.
- Type - The type of credentials.
Tells if the timeline is in play mode or not. When a presentation is running, it is always in play mode, but in the editor it is not in play mode when the user is editing.
Returns True if the timeline is playing, or False if it is not.