Developing and testing the script
An "Automation Script" is developed as any project with the Workbench, but with some particular constraints. The biggest difference is that a script is a program (generally written in ST language) that is executed only once, and not repeated from cycle to cycle. The top program must have the special "task" property set to "SCRIPT". However, you don't need to care about that as the "New Script" wizard has generated the skeleton of the script project for you:
The "Main" program is the automation script. You can freely create sub-programs and UDFBs to be called by this program, but it is recommended to keep only one top level program for the script (the "Main" program).
The script project refers to a special library called "AUTOMATION" that contains all necessary functions for developing scripts:
When developing a script project, the commands "Simulate" and "On Line" of the "Project" menu are replaced by the "Execute Script" command:
This command enables to run your script for test purpose. It opens the following box:
Enter the name of the target project (to be created or changed) in the upper box and press "Go!". Any trace message or error report is displayed in the list below.