Difference between revisions of "ISKernel:WaitFor (Command)"

From Lavish Software Wiki
Jump to navigation Jump to search
 
Line 28: Line 28:
 
== See Also ==
 
== See Also ==
 
*[[LavishScript:Commands|LavishScript Commands]]
 
*[[LavishScript:Commands|LavishScript Commands]]
 +
*[[IS:Kernel#Commands|Kernel Commands]]
 
*[[IS:Session#Commands|Inner Space Session Commands]]
 
*[[IS:Session#Commands|Inner Space Session Commands]]
 +
  
 
{{Command-Stub}}
 
{{Command-Stub}}
 
[[Category:Inner Space]]
 
[[Category:Inner Space]]
[[Category:Inner Space Session]]
+
[[Category:Inner Space Kernel]]
[[Category:Inner Space Session Commands]]
+
[[Category:Inner Space Kernel Commands]]

Latest revision as of 04:25, 19 October 2005

Syntax

Command Difficulty Rating
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

See Also