AppleScript tip: the delay command

By Alvin J. Alexander, devdaily.com

If your AppleScript is running too fast you can slow it down with the delay command, like this example:

display dialog 1 buttons {"OK"}
delay 3
display dialog 2

When you click OK after the first dialog, your AppleScript program goes to sleep for three seconds, then displays the second dialog.

Hopefully you'll have more practical uses for this than my sample code. :)


devdaily logo