TradePatio uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our privacy policy.

LUA Scripts

Script manager

mceclip0.png

This tool allows you to create and run Lua scripts as well as view the execution log.

The new script is created by clicking on the "CREATE" button. The "Code Editor" modal window will be opened:

mceclip1.png

On the "GENERAL" tab you should enter the name of the new script and its description (optional). The name should be unique in your list of scripts.

mceclip2.png

The "CODE" tab contains the body of the Lua script itself.

mceclip3.png

The "FORM" tab of the JSON array configures the form that the user should fill out when the script starts. In the code, this data as a Lua-object can be obtained using the get() method of the "input" module.

local input = require("input")
scriptForm = input.get()

To complete the script creation, press the "CREATE" button.

Scripts are controlled by following buttons:

z.pngthis button completely deletes the script.

__.png opens the script editing window, which is identical to the script creation window. Stop the script before it is edited.

___.png opens the script launch window containing the starting form.

____.png the startup button has been replaced with the stop button of the script.

_____.png opens a modal window containing the execution log of the script added using the "log" module.