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

Chapter 6. Improving Script Organization with Handlers

Now that you have learned how to work with variables, lists, records, conditional logic, loops, and other key AppleScript programming constructs, it is time to look at how to improve the overall organization and manageability of your AppleScripts through the implementation of handlers. A handler is a group of program statements enclosed inside a named code block that can be called upon to execute as necessary from different parts of your AppleScripts. Handlers facilitate modular program design and code reuse. They can be used to make your AppleScript easier to read and understand. This chapter will also cover the use of event handlers. An event handler is a special type of handler that is ...

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