Lua Scripting
What does it do?
You can create a Lua script to run before the alias starts. The main purpose is to dynamically modify the parameters or file name of the alias, but you can use Lua for other tasks as well. Keep in mind that the script environment has no preloaded libraries—this is vanilla Lua.
How to use it?
The script API is minimal (cf. below). You can Dry run the script to preview its behaviour. When you’re satisfied, click Apply. The script will only be saved to the database if you click Save on the main page.
API
The API is case-sensitive
Description of context
Contains information about the script context. This can be updated within the script.
The main purpose of the scripting feature is to update the context. This context includes the following values:
Property | Purpose |
---|---|
FileName | The file name configured for this alias |
Parameters | The parameters the user has configured for this alias |
IsCancelled | When set to true , the alias will not be executed. Otherwise, it will be executed normally |
Description of notification
Provides a way to notify the user through the UI.
The following methods are supported:
Method | Description |
---|---|
notification:Information("Hello world") | Sends an information message |
notification:Warning("Hello world") | Sends a warning message |
notification:Error("Hello world") | Sends an error message |