# Function Blocks Types

Vehicle Spy supports three types of Function Blocks:

* [Script Type](https://docs.intrepidcs.com/vspy-3-documentation/3.9.12/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/script-type-function-block): Lets you write a program consisting of a set of *command steps* that control the operation of Vehicle Spy. You can use messages and signals as part of the script; for example, you could write a script to transmit a set of messages in response to receipt of an **Engine RPM** message. These are often called *function block scripts*.
* [Capture Type:](https://docs.intrepidcs.com/vspy-3-documentation/3.9.12/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/capture-type-function-block) Captures messages and signals and logs them to a file, based on parameters you select. The recorded file can be used for playback, simulation or analysis. This function block type is also known as a *capture block*.
* [Playback Type](https://docs.intrepidcs.com/vspy-3-documentation/3.9.12/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-types/playback-type-function-block): Allows a data file to be played back through hardware. This is a quick way to set up a simulation for a node or vehicle. This type of function block is also called a *playback block*.

The type of block is selected at the time it is added by clicking the ![](https://cdn.intrepidcs.net/support/VehicleSpy/assets/function_block_toolbar_add.gif) button at the far left of the [toolbar](https://docs.intrepidcs.com/vspy-3-documentation/3.9.12/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-blocks-toolbar). There you will see a small submenu appear, as shown in Figure 1, showing the three types. After you select the type of function block you want to create, it will be added to the [Function Block List](https://docs.intrepidcs.com/vspy-3-documentation/3.9.12/vehicle-spy-main-menus/main-menu-scripting-and-automation/function-blocks/function-block-list).

The type of function block chosen determines what is found in the setup area that comprises most of the function block window.

![Figure 1: Add Function Block submenu.](https://2280262322-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3KyOmcYmM6ZVd3OQDa1%2Fuploads%2F4L8HQe13efguck4AUeb1%2Ffunction_blocks_add_submenu.gif?alt=media\&token=666e7269-f585-4e8a-ae33-0cfca36ef3b0)
