In Docklight Scripting the program behavior is controlled by three different types of user data:
The project data includes:
•Additional Project Settings: communication mode, COM ports used, COM port settings (baud rate, parity, ...)
The project is saved in a Docklight project file (.ptp file) using the menu File > Save Project or File > Save Project As...
It is generally recommended to save your project before starting a test run.
NOTE: Saving your project only stores the project's sequences, settings and Notepad data. If you want to save a log of the communication during a test run, see section logging and analyzing a test.
Loading a project is done using the File > Open Project... menu.
Docklight script code for automated testing tasks is saved in a separate file (.pts file). Use the menu Scripting > Save Script or Scripting > Save Script As...
Docklight Options (text formatting, control-character behaviors, a.s.o) can be modified by using the Docklight Options dialog (menu Tools > Options...).
When running your own script you may want to use a specific set of Options to ensure the communication and log output are created in a certain way. This is possible by using the SaveProgramOptions and LoadProgramOptions methods in your script.
In most Docklight Scripting applications, a Docklight script (.pts file) requires an accompanying project (.ptp file). You can use the following naming scheme to enable automatic loading and script start:
If the two files are located in the same folder, Docklight Scripting will perform the following additional operations:
•If myproject.ptp is opened (either double-click in Windows Explorer, or using menu File > Open Project...), Docklight Scripting also opens myproject_auto.pts alongside, if not already open.
•If myproject_auto.pts is opened, Docklight Scripting also opens myproject.ptp alongside, if not already open.
•If Start communication is executed, the communication port is opened and the script is started.
NOTE: If myproject.ptp is opened in Docklight (non-scripting), a warning appears that this seems to be a project with script support and its use is limited in Docklight (non-scripting).