O'Reilly logo

AppleScript® Programming for the Absolute Beginner by Jerry Lee Ford

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

Leveraging the Power and Convenience of Handlers

So far, all of the AppleScript games that you have worked on have consisted of various program statements that work together as a group to perform a particular task. For small scripts, like the AppleScript games you have worked on so far, this approach has worked well. As your AppleScripts grow in size and complexity, they will become more difficult to develop and maintain. To make them more manageable, you need to learn how to develop and organize your AppleScripts in a modular fashion using handlers. As I mentioned at the beginning of this chapter, a handler is a named group of statements, sometimes referred to as a subroutine or function, that can be called upon to execute from different locations ...

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