O'Reilly logo

Apple Pro Training Series: AppleScript 1-2-3 by Bill Cheeseman, Sal Soghoian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 24. Adding Timing Controls to Scripts

The delay Command

The Idle Handler

The Easy Way: Use iCal

What’s Next?

There’s an old saying that “timing is everything.” Although this phrase is usually used when describing one’s life choices, it sometimes applies to AppleScript, too. Controlling the speed and timing of your scripts is essential when automating tasks that

• require a momentary pause, such as while a window opens or a Web page loads; or

• occur over a period of time or at specific times, such as a script that downloads your e-mail at 2 p.m. and 5 p.m. every day.

In this chapter, we’ll examine techniques and strategies for addressing time requirements in scripts.

The delay Command

The most basic form of time manipulation is adding ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required