clock.sleepFor
| Syntax |
clock.sleepFor (duration)
|
| Params |
duration is the number of seconds for which you wish to pause a background operation.
|
| Action |
Sets the number of seconds that should elapse before the background (agent) script should be called again.
|
| Returns |
True
|
| Examples |
Create a new script in system.agents called "Annoyance." Enter the following two lines: speaker.beep (); clock.sleepFor (10)
Then click the Compile button. The agent causes a speaker beep every 10 seconds. To get rid of this little annoyance, just cut the script. |
| Errors |
This verb will generate an error if called from a script that is not running as an agent.
|
| Notes |
This verb does not immediately cause the agent script to pause execution. Sleeping begins when the script returns control to the system. In the context of this verb, the itemhit callback script of a modeless dialog is considered to be an agent. Calling clock.sleepFor from a modeless dialog itemhit script will cause it to be called with a special itemhit value of -3 if the specified period elapses before the user clicks on an item.
|
| See Also |
clock.waitSeconds
|