Overview
The Scripts Module allows the automation of various tasks through scripting. You can configure these tasks to run in response to specific events or on a scheduled basis, enhancing the application's efficiency and functionality. Script tasks can also call Script Classes or use external DLLs.
On this page:
Configuring ScriptTasks
Tasks are program units written in VB.Net, C#, or Python that execute when a trigger event occurs or periodically at specified intervals. To create and configure a Script Task, follow the steps below:
- Access Scripts / Tasks.
- Click on the plus icon.
- Input a task name and description, and select the desired language.
- Choose to either create a new code or import one from an existing library.
- Click Ok.
Now, you can double-click the newly created row to access the Code Editor, where you can insert the code for the Script Task.
To edit a property of an existing Script Task, click the desired property to select it and click it again after a second to edit it. See a list of available properties in the next section.
The image below illustrates the process described above.
Built-in Tasks
All solutions include the following built-in tasks:
- Server Startup: Executed when the solution starts running. Runs on the server (computer running TServer.exe).
- Server Shutdown: Executed when the solution shuts down. Runs on the server.
- Client Startup: Executed on each client when the Displays module (TVisualizer.exe) starts running.
- Client Shutdown: Executed on each client when the Displays module closes.
Properties Reference
Tasks Properties
The following is a table describing each available property field for ScriptTasks:
If a property column is not visible on the grid, enable it by right-clicking the grid header and selecting it from the list.
Property | Description |
---|---|
ID | Identifies the unique identifier of the ScriptTask object. |
VersionID | Represents the modification version of the ScriptTask, which increments with each modification related to this object. |
Name | Specifies the name assigned to the ScriptTask. |
Code | Defines the programming language used for the ScriptTask. |
Domain | Specifies where the script executes, either on the Client system locally or on the Server globally. |
Trigger | Identifies the event that triggers the ScriptTask. |
Period | Sets the interval for periodic execution of the task. |
InitialState | Indicates if the task is initially Enabled (ready to run) or Disabled (not ready to run). |
Lines | Displays the code lines for the ScriptTask. |
EditSecurity | Controls the permissions for editing the ScriptTask. |
BuildStatus | The task code's status results from the continuous compiling process. Green check mark: The task runs without errors. Red X: The task has warnings or errors, double-click to access the warning or error. Warnings are information only. Errors will prevent the code from running for that specific task. The rest of the solution will run. |
BuildErrors | Lists the number of errors encountered during the build process. |
BuildMessage | Provides messages related to the build process. |
Level | Categorizes the priority or level of the ScriptTask. |
Category | Groups the ScriptTask into a specific category. |
LockState | Indicates if the ScriptTask is locked for editing. |
LockOwner | Displays the user who owns the lock on the ScriptTask. |
DateCreated | Records the date and time when the ScriptTask was created. |
DateModified | Shows the date and time of the last modification to the ScriptTask. |
Description | Describes the purpose and functionality of the ScriptTask. |
In this section: