ISKernel:WaitFor (Command)
Jump to navigation
Jump to search
Contents
Syntax
WaitFor | |
Usage | Intermediate |
Level of Understanding | Intermediate |
Computer Savvy | Intermediate |
Logic | Intermediate |
WaitFor <up to 20 things> [max wait in tenths of seconds]
Description
WaitFor can only be used within a script.
WaitFor is generally used to wait for one of several responses, through the triggers service, to an action. Script execution is paused until one of the responses is found, or the specified timeout interval elapses. WaitFor will use each possible response given as a case sensitive search string. If no timeout is given, the default is 5 seconds. The WaitFor Top-Level Object is then used to determine the result of the command.
Examples
- Example 1
Press N WaitFor "You don't have one" "You drank the" Switch ${WaitFor} { case 0: echo "WaitFor Timed out" break case 1: echo "I didn't have one!" break case 2: echo "Phew, I drank it" break } EndSwitch