HyperTalk Reference
Home » HyperTalk Reference » Commands

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.


wait [for] posInteger [ticks] wait [for] posInteger seconds wait until trueOrFalse wait while trueOrFalse The wait command causes HyperCard to pause before executing the rest of a handler, either for a specific length of time, until a specified condition becomes true, or while a specified condition remains true.

If you do not specify seconds as the unit of time, HyperCard uses ticks. (One tick equals one-sixtieth of a second.)


wait 7
wait for 7
wait 7 ticks
wait for 7 ticks

wait for 1 second
wait 3 seconds

wait until the mouse is up
wait until the mouseLoc is within the rect of button 1
wait until the sound is done
wait while the commandKey is down
wait while the mouseLoc is within the rect of button 1
wait until the mouseClick

Demo Script

on waitUntilTheMouse
   set the cursor to arrow
   show bkgnd field "demo field"
   displayMessage "Click the mouse to continue . . ."
   wait until the mouseClick
   hide bkgnd field "demo field"
 end waitUntilTheMouse


An expression that evaluates to a positive integer.

For example:
67 mod 13
the number of bg fields
the number of backgrounds
the number of cards div 2
See also: background, bkgnd, button, card, chunk, field, menu, and menuItem

Any expression that evaluates to the HyperTalk and AppleScript constants true or false.

For example:

the hilite of bg btn "Yes"
fld "Zip" contains "95014"
the short name of this stack is "Fred"

Related Topics

« visual | HyperTalk Reference | write »

Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Modern View