Chapter 19. Organizing Your Code with Script Objects

Script objects are probably the most underutilized complex feature in the AppleScript language. This chapter explains the idea behind script objects and what they can do, and it discusses real-world techniques for putting them to effective use in your projects.

Initially, it is difficult to see what's so great about script objects. After all, many AppleScript users manage to create terrific scripts that do everything they want without ever going near script objects. So, what's all the hoopla about? Well, if your scripts are fairly small and simple, you can just ignore script objects altogether—good tidiness and a smattering of handlers are all you normally need to organize that sort of code effectively. ...

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.