> For the complete documentation index, see [llms.txt](https://docs.intrepidcs.com/vspy-3-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](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/script-type-function-block-command-wait-for.md).

# Script Type Function Block Command: Wait For

### Command Description

This command causes the function block script to wait for a period of time before continuing to the next step.

### Value Field Parameters

The **Value** field indicates how long the script should wait, in seconds. It can be specified in two ways:

* **Static Wait Time:** After the **Wait For** command is selected, a default value of 0.001 seconds (1 millisecond) will appear by default in the **Value** column field. Double-click the field and change the figure to however long you want the script to wait.
* **Dynamic Wait Time:** Double-click the **Value** cell, then press the **=** key twice to launch the [Expression Builder](/vspy-3-documentation/shared-features-in-vehicle-spy/shared-features-expression-builder.md). The script will wait for a number of seconds equal to the value returned by the defined expression.

### Example

Figure 1 shows an example of a function block script using a dynamic **Wait For**command (and a [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) command as well). The script waits for receipt of an incoming message, then uses the value in a signal it contains to dictate how long to wait before sending an outgoing message. The script then repeats the process the next time the incoming message arrives.

![Figure 1: Example using the Wait For and Wait Until commands.](https://3170208387-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL6lcovCpkhoS9uTOFtEp%2Fuploads%2Fl5R7Oa0MrbKfaM39lqj8%2Ffb_wait_for.gif?alt=media\&token=40cb33fb-d2c6-4379-b843-5b8b13cd3c7c)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` 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/script-type-function-block-command-wait-for.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
