A toolbar at the top of the setup area for script type function blocks allows you to work with steps as you develop your script program. This region is also where Vehicle Spy warns you in real time of any errors that it may currently see with the script as it has been defined thus far (Figure 1).
Table 1 illustrates and explains the script toolbar controls in Figure 1.
Table 1: Function Block Script Toolbar Controls
Several of these commands are also available in a right-click menu. First select the step you want to work with, then right-click, and you will see entries for the Copy, Paste Before, Insert After, Insert Before and Delete commands (Figure 2). The other entries on this menu, such as Run To Step, Force and Modify Variables, are used for script tracking and debugging.
To the right of the script toolbar is a text display that tells you the current error status of your script. If Vehicle Spy detects no problems in the syntax of your script, this area will say No Errors in blue.
If an error is found, it will be shown in red as in the example in Figure 1. Note that error-checking is dynamic and immediate, so transient errors may appear here. For example, the error in Figure 1 will appear if you've just added an If step but haven't inserted the matching End If step yet. Similarly, an error may briefly display after entering a command step but before selecting its parameters. You only need to make sure that there are no errors showing here when the script is complete and ready to run.