Returns the number of nested wait commands(command) currently pending.Syntax:
waitDepth()
Examples:
the waitDepth
if the waitDepth > 10 then beep
Use the waitDepth function to determine how many wait commands are currently awaiting completion.
The wait with messages form of the wait command, when used in a handler, pauses that handler while allowing LiveCode to execute other handlers while waiting. The waitDepth function indicates how many such statements are currently executing--that is, how many handlers are currently paused by a wait with messages statement.
If there are no paused handlers, the waitDepth function returns 1.
See also: function (control structure),