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 ...

Get Learn AppleScript: The Comprehensive Guide to Scripting and Automation on Mac OS X, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.