Pausing Script Execution

The sleep function lets you pause script execution for a given amount of time.

The form is:

sleep <time_in_seconds>

The time argument is a floating point number of seconds to sleep.

Note that the sleep time is not guaranteed to be extremely accurate. You can interrupt a sleep with the ESC key which halts all execution or with the SPACE bar which simply causes the sleep function to terminate and the script to continue executing. In both cases, you may need to hold the key down for up to half a second for MAXScript to respond.