Script Type Function Block: Script Toolbar

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).


Figure 1: On the left, function block script toolbar controls; on the right, the error status reporting area, currently indicating an issue with an If command.

Script Toolbar Controls

Table 1 illustrates and explains the script toolbar controls in Figure 1.

Table 1: Function Block Script Toolbar Controls

Button Icon Description
Add Step After
(Insert After)
Adds a new step to the script after the one currently selected.
Add Step Before
(Insert Before)
Adds a new step to the script before the one currently selected.
Delete Step Deletes the currently-selected script step.

You can also delete the currently-selected step using the Deletekey on your keyboard.
Cut Step Copies the currently-selected script step to the Windows Clipboard, and then removes it from the script.
Copy Step Copies the currently-selected script step to the Windows Clipboard without removing it.
Paste Step Pastes before the currently-selected step a script step previously added to the Windows Clipboard via the Cutor Copy buttons.
Undo Reverses the last Delete operation.
Tracking When enabled, while a script is running, the script grid will scroll to track the current step being executed. This feature can be useful for monitoring scripts that are too large for all of their steps to be displayed on the screen at once.

This is a toggle control that is enabled by default.

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.


Figure 2: The script toolbar control right-click menu.

Error Status

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.


  Spy Documentation - (C) Copyright 1997-2022 Intrepid Control Systems, Inc.