Script editor allows you to write and manage scripts.
The main editor's window:
The scripts run in the order how they are sorted in the list. This order can be easily changed by dragging a script into a new location.
The line starts with the script Id. This number is shown in communication log to track the relevant script. E.g.
Jul 26 17:23:27.450: ERROR: LUA scripts: Can't execute LUA script #3.
Then goes title and two or three icons indicating type of script (see more details below), wether it has modifications, and its running state (Enabled/Disabled). In this example all possible types are shown with their respective icons.
You can set here name for the script, select type, disable or enable it and give short description.
There are 5 types of scripts:
WebHMI has handy code editor with useful features:
Table of hotkeys:
|F6||toggle compact / full-screen mode|
|Crtl-S||save the script|
|Ctrl-F||find and highlight occurence|
|Ctrl-H||find and replace|
|Ctrl-L||Select specific line|
|Ctrl-[ or Shift-Tab||decrease indent|
|Ctrl-] or Tab||increase indent|
|Ctrl-U||convert text to upper case|
The toolbar has the following buttons (from left to right):
When there are no scripts yet in the project, the +Add script button is placed in the page center. After adding a script it is moved to the top-right page corner.