05.01.2013 Views

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

418<br />

CHAPTER 23 MAC <strong>OS</strong> X AUTOMATION WITH AUTOMATOR AND APPLESCRIPT<br />

What’s amazing about AppleScript is not the language itself but what it does. Even in the<br />

high-performance world of professional software development, when you need to control<br />

another application, AppleScript is the first place to turn.<br />

Application developers who write scriptable applications are a boon to the platform. Not<br />

only do they enable AppleScript gurus to work their magic, but they also contribute to Automator.<br />

With <strong>Leopard</strong>’s new Scripting Bridge, it’s even more important to be scriptable, because<br />

programmers in other languages can now address AppleScript’s application hooks directly.<br />

Automation saves people time and eliminates wasted effort, and the foundation of automation<br />

is interapplication cooperation. The more developers and users can leverage existing<br />

applications, the more our platform becomes extensible, flexible, and, that most important of<br />

attributes, usable.<br />

More Information<br />

If you think there’s something to the phrase “Cult of <strong>Mac</strong>,” you should see the zealots in the<br />

<strong>Mac</strong> automation community. I don’t think we’ve ever written an AppleScript or a halfway decent<br />

Automator action without consulting at least one of the following sources:<br />

Automator home page (http://automator.us/): Sal Soghoian is Apple’s product manager<br />

for automation and is generally recognized as a, if not the, foremost expert on AppleScript<br />

and Automator. We can also personally attest that he is a character. All that aside, Sal’s<br />

Automator page has everything you need to know, from the whys and wherefores<br />

of Automator to a massive collection of free Automator actions and links to other<br />

great Automator sites on the Web.<br />

Automator Programming Guide (http://developer.apple.com/documentation/<br />

AppleApplications/Conceptual/AutomatorConcepts/): This is Apple’s official documentation<br />

on developing Automator actions. There’s less here for the casual user, but the barrier to<br />

becoming a power user who can bust out custom actions is really not all that high. If you<br />

have any scripting or programming experience, you’re practically there already.<br />

AppleScript: The Comprehensive Guide to Scripting and Automation on <strong>Mac</strong> <strong>OS</strong> X,<br />

Second Edition by Hanaan Rosenthal (Apress, 2006): This is the ultimate tome on<br />

AppleScript and is, as of this writing, more up-to-date than even Apple’s own<br />

documentation. Hanaan’s critically acclaimed work will walk you step by step from<br />

automation neophyte to AppleScript master. It also makes a great footstool, on account<br />

of being huge.<br />

AppleScript Essential Subroutines (http://www.apple.com/applescript/guidebook/sbrt/):<br />

This hidden page of useful AppleScript functions is the first place we turn when we get<br />

stuck trying to figure out how to do something. There’s not a lot here, but what is here is<br />

solid gold.<br />

AppleScript Language Guide (http://developer.apple.com/documentation/AppleScript/<br />

Conceptual/AppleScriptLangGuide/): This is Apple’s official documentation on AppleScript<br />

and quite possibly the oldest document on the entire Internet. Apple keeps saying it is<br />

going to update this as part of <strong>Leopard</strong>’s AppleScript improvements, but it hasn’t<br />

happened yet. We can understand the reluctance. With contributions by such notable<br />

minds as Mark Twain, Alexander Hamilton, and Sir Isaac Newton, this document is<br />

practically a national treasure.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!