Welcome to LuaScript
LuaScript is an Active Scripting Engine for the Lua language.
LuaScript supports all of the documented Active Script Engine functions including Active Script Debugging and Colour syntax highlighting
LuaScript is based on the programming language LUA. For more information about LUA, visit the LUA website
LuaScript implements several extensions to LUA to support Automation objects.
These extensions come in two forms Built-in extensions and additional Global functions that can be called.
LuaScript extends the standard Lua '.' notation to include navigation of Automation properties and values. LuaScript also uses the ':' notation to call member functions of an Automation object. Most scripting hosts provide a default Automation object that provides the Automation interfaces that the scripting host provides. This is accessed through the global 'external' variable. For example the following Lua code gets the value of a property called value of an object text1 performs a function Func on it and stores the result of the function in the value property of the text2 object.
external.text2.value = Func( external.text1.value)
The following code calls the Automation function CallIn of the host-provided default dispatch object. Optional parameters param can be specified in the call.
external:Callin([param[,param...]])
Creates an automation object given using the programmatic ID name.
Disconnects the automation object obj from the LuaScript Engine so that when the host exits the object continues to run.
When this function is called, the application associated with the specified pathname is started, and the object in the specified file is activated. If pathname is a zero-length string (""), GetObject returns a new Automation object instance If the pathname argument is nil, GetObject returns a currently active object of the specified type. If no object of the specified type exists, an error occurs.
Queries the automation object obj for a property name and if that property supports a collection returns that collection as a Lua table.
Queries the object obj for a property name and returns that property. Optional parameters param can be specified in the call.
Sets the property name of the object obj to the value value. Optional parameters param can be specified in the call.
Calls the method name of the object obj and returns value returned by that method. Optional parameters param can be specified in the call.
Constructs the object name of the object obj and returns value returned by that method. Optional parameters param can be specified in the call.
Returns a table containing any significant information in the TypeInfo of the object obj
Returns a table containing any supported interfaces of the object obj
Returns the value of the automation object obj
Built in, there is a debugging enhancement that allows local variables, global variables and functions to be inspected. This is via a built in Lua C-Function called 'StackDialog()'.
Click here to download the LuaScript installation executable, or here for compressed version
After download, further examples of LuaScript can be found in the installation subdirectory
This page was last updated on 13th October 2002.