# Script Type Function Block: Commands

The script in a [Script Type Function Block](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block.md) consists of a series of commands that instruct Vehicle Spy to perform certain actions. Each step in the script consists of one command, a set of parameters (if needed) and an optional comment.

Table 1 contains a list of all of the available commands for function block scripts. Each row has a short description of the command and the parameters associated with it, and includes a link to a page containing full details.

**Table 1: Function Block Script Commands**

| **Command**                                                                                                                                                                                                                                        | **Description**                                                                                                                                                                                                                                                                                           | **Parameters (Value Column)**                                                                                                                             |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [**Clear History**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-clear-history.md)                 | Clears the message history.                                                                                                                                                                                                                                                                               | --                                                                                                                                                        |
| [**Clear Stats**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-clear-stats.md)                     | Resets the statistical data for messages or networks.                                                                                                                                                                                                                                                     | Selection of whether to clear stats for one message, stats for one network, or all stats.                                                                 |
| [**Comment**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-comment.md)                             | Documents the script with an explicit comment.                                                                                                                                                                                                                                                            | --                                                                                                                                                        |
| [**CoreMini Action**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-coremini-action.md)             | Starts, stops, or downloads [CoreMini](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-tools/utilities-coremini-console.md) scripts (**.vs3cmb** files) that run in ICS hardware while disconnected from a computer.                                                                               | Action to perform, and for a download, the storage medium and CoreMini file to use.                                                                       |
| [**DAQ Action**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-daq-action.md)                       | Starts, stops, calls, saves data from, or waits for the completion of a [VehicleScape DAQ](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-measurement/vehiclescape-daq.md) Job.                                                                                                                   | Action to perform and DAQ job to act upon.                                                                                                                |
| [**Diag Job Action**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-diag-job-action.md)             | Starts, stops, calls, saves data from, or waits for the completion of the specified [Diagnostics](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-spy-networks/diagnostics/diagnostics-view.md) Job.                                                                                               | Action to perform and diagnostic job to act on.                                                                                                           |
| [**Else**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-commands-if-else-else-if-end-if.md)                | Marks the end of the commands executed when an **If** or **Else If** expression evaluates as **True**, and the start of those executed when that expression is **False**.                                                                                                                                 | --                                                                                                                                                        |
| [**Else If**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-commands-if-else-else-if-end-if.md)             | Combines an **Else** and **If** statement. Marks the end of the commands executed in a preceding **If** or **Else If** block, and the start of a new set of commands executed if a specified condition is **True**.                                                                                       | Conditional expression created with the [Expression Builder](/vspy-3-documentation/shared-features-in-vehicle-spy/shared-features-expression-builder.md). |
| [**End If**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-commands-if-else-else-if-end-if.md)              | Marks the end of an **If / Else / Else If / End If** control logic structure.                                                                                                                                                                                                                             | --                                                                                                                                                        |
| [**End Loop**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-commands-start-loop-and-end-loop.md)           | Marks the end of a loop begun by the **Start Loop** command.                                                                                                                                                                                                                                              | --                                                                                                                                                        |
| [**Function Block Action**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-function-block-action.md) | Starts, stops, calls, triggers, or saves the data of a function block.                                                                                                                                                                                                                                    | Action to perform and function block to act upon.                                                                                                         |
| [**If**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-commands-if-else-else-if-end-if.md)                  | Starts an **If / Else / Else If / End If** conditional logic structure, specifying an expression that, if it evaluates as **True**, causes the following commands to be executed until an **Else**, **Else If** or **End If** command is encountered.                                                     | Conditional expression created with the Expression Builder.                                                                                               |
| [**Jump If**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-jump-if.md)                             | Jumps to a specified step in the script if a specified condition is **True**; otherwise, continues with the next sequential step.                                                                                                                                                                         | Step number and expression created with the Expression Builder.                                                                                           |
| [**Jump To**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-jump-to.md)                             | Jumps to a specified step in the script.                                                                                                                                                                                                                                                                  | Step number.                                                                                                                                              |
| [**Load Message Data**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-load-message-data.md)         | Loads hex data from a file into a transmit message.                                                                                                                                                                                                                                                       | File name, file start index, length, message name, message start index, and fast load option.                                                             |
| [**Log Data**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-log-data.md)                           | Logs selected data to a file or monitoring device.                                                                                                                                                                                                                                                        | File name, log type, data to log and optional parameters.                                                                                                 |
| neoVI PRO Action                                                                                                                                                                                                                                   | (This command is deprecated.)                                                                                                                                                                                                                                                                             | --                                                                                                                                                        |
| [**Pause**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-pause.md)                                 | Displays a message to the user in a dialog box, then waits for a button click from the user to either continue or terminate the script.                                                                                                                                                                   | A message for the user, which is created using the Expression Builder.                                                                                    |
| [**Read Data**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-read-data.md)                         | Reads data from a specified location in a file and stores it into one or more application signals.                                                                                                                                                                                                        | Name of file, location in file to read from, and signal(s) to hold data.                                                                                  |
| [**Set Value**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-set-value.md)                         | Set the value of a signal in Vehicle Spy.                                                                                                                                                                                                                                                                 | Expression defining signal to be set and value to be assigned.                                                                                            |
| [**Set Value If**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-set-value-if.md)                   | Combines an **If** and **Set Value** into a single command, assigning a value to a signal or variable and executing the following commands if an expression evaluates as **True.** This command guarantees that no signal values will change between evaluating the expression and making the assignment. | Conditional expression and assignment expression.                                                                                                         |
| [**Show Panel**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-show-panel.md)                       | Displays a specified graphical panel.                                                                                                                                                                                                                                                                     | Graphical panel window and specific panel to show.                                                                                                        |
| [**Sleep**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-sleep.md)                                 | When run within a [CoreMini](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-tools/utilities-coremini-console.md) script, forces the network interface hardware into a sleep state. Not valid for function blocks run in Vehicle Spy.                                                              | --                                                                                                                                                        |
| [**Start Loop**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-commands-start-loop-and-end-loop.md)         | Starts a loop of steps that are repeated a number of times.                                                                                                                                                                                                                                               | Number of iterations for the loop, which can be a simple integer or an expression.                                                                        |
| [**Stop**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-stop.md)                                   | Ends the function block.                                                                                                                                                                                                                                                                                  | --                                                                                                                                                        |
| [**Test DTC**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-test-dtc.md)                           | Tests a received J1939 message for DTCs and copies the DTC information to an application signal.                                                                                                                                                                                                          | Receive message to test, DTCs to look for, application signal to store the data, and other settings.                                                      |
| [**Text API**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-text-api.md)                           | Sends a Text API command.                                                                                                                                                                                                                                                                                 | Text API string created using the Expression Builder, optional application signal to receive the string and optional remote server.                       |
| [**Transmit**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-transmit.md)                           | Transmits a message.                                                                                                                                                                                                                                                                                      | Transmit message to send.                                                                                                                                 |
| [**Wait For**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-wait-for.md)                           | Waits a specified amount of time before moving to the next step.                                                                                                                                                                                                                                          | Number of seconds to wait, specified either numerically or through an expression.                                                                         |
| [**Wait Until**](/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands/script-type-function-block-command-wait-until.md)                       | Waits until the desired condition is **True**, then moves on to the next script step.                                                                                                                                                                                                                     | Expression created with the Expression Builder.                                                                                                           |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.intrepidcs.com/vspy-3-documentation/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
