O'Reilly logo

Learn AppleScript: The Comprehensive Guide to Scripting and Automation on Mac OS X, Third Edition by Hanaan Rosenthal, Hamish Sanderson

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 18. Organizing Your Code with Handlers

Although user-defined handlers aren't the first thing you create when you learn AppleScript, they are the one facet of writing scripts that will have the most impact on your scripts, especially as they grow bigger and more ambitious. Handlers are your tools for organizing scripts; they make your scripts efficient and give you a perfect way to store and reuse your code.

You do not have to understand handlers in order to write simple AppleScripts, but they are well worth learning about. In addition to enhancing the design of your day-to-day scripts, they are a required feature in more advanced projects such as developing your own GUI applications.

In this chapter, you will learn more about why handlers ...

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