The Zeus Lite installer comes with an installation of Lua, making it easy to get started at learning to program Lua. This page walks through the steps needed to write your first Lua code using Zeus Lite.
To create some example Lua code use the Templates feature as shown in the image below:
As per that image, select the Templates panel, select the Lua Document Type from the dropdown list, select the New File option and save the resulting code to the example.lua file.
With the example.lua as the active file, use the Macros, Execute 'example.lua Script menu as shown below:
This menu opens up the Lua execution window and runs the currently active file using the Lua interpreter. The result will be the following execution window:
As per the instructions found in the Lua code and reflected in the execution window, fill in a user name and hit enter to complete the execution of the example.lua file.
The execution of the script will now be complete, and Zeus Lite will capture the output produced and display that output inside the editor as shown below:
It is also possible to do a basic syntax check of the Lua file from inside the editor. With the example.lua as the active file, use the Compiler, Compile menu to run the syntax check.
As an example, assume the end statement is missing from the function. After running the check on the broken file, the following output will be produced:
Click on the line of error output and Zeus Lite will navigate to the file and line number that is at fault.
To get more information about the Lua programming language and to start learning the language, make sure the example.lua is the active file, and then use the Macros, Lua Reference Manual menu. This will open up the Lua documentation inside the browser window. Zeus Lite is running the latest 5.4 version.