To create a new script, select the
button. The following screen will appear:You may edit multiple scripts at the same time. To do so, open scripts for editing side-by-side.
When creating a new script, you are presented with the following options:
Enter a name to identify the script. The name of the script must match the name of the screen the script will be used for. If the script name does not match the screen name, the script will not be used. Because a single screen may require more than one script, you may save multiple scripts having the same name. The order, notes, and content of each script will distinguish one from the other.
Enter a brief description of the script.
Specify the order in which the script should be run. The script having the lowest number (i.e., "0") will be run first, and then following scripts will be run in consecutive order.
Displays the name of the package the script belongs to, if any.
Select to enable the script. If not selected, the script will be disabled. A disabled script will not be run when the corresponding screen is executed.
Enter the content of the script using QtScript. You may type the script directly into this window, or you may import a script using the
button.The spin box in the lower left hand corner shows you the current line number—and allows you to jump to specific line numbers within the script.
Enter a search term in the field and then select the
button to locate matches within the script.The following buttons are unique to this screen:
Select to locate search term matches within the script.
Select one of the following available options to extract widget nodes from the selected script's XML source. Either option should insert var _foo = mywindow.findChild("_foo");
for the widgets in the screen. The information will appear above the main text of the script.
Selecting this option should include XLabel
and QLabel
widgets.
Selecting this option should exclude XLabel
and QLabel
widgets.
Select to import a script from your local file system into the database. This option is useful if you prefer to do your scripting using an external script editor. The script you import will be shown in the script window.
Every time you import a script file, the new script will replace the script which was shown in the script window previously.
Select to export the script shown in the script window to your local file system. You would use this option if you need or want to edit the script and do not have a copy stored locally on your system. Once exported, the script can be edited using an external editor—and then re-imported into the database using the Import option. Whenever you import a script file, it automatically replaces whatever script was in place before it.