Recording Scripts in “Watch Me” Mode

You can, if you wish, create a script by typing out the computer commands one at a time, just as computer programmers do the world over. Details on this process come later in this chapter.

But if the task you want it to handle isn’t especially complex, you’ll be pleased to discover that in Mac OS X 10.3—surprise!—the Finder itself is once again recordable, much as it was in the Mac OS 9 days. That is, you can create a script just by doing the job manually—using menu commands, opening windows, changing window views, and so on—as Script Editor watches and writes out the necessary lines of code automatically. Recording an action and watching the Mac turn your movements into lines of AppleScript code is a fantastic way to learn how AppleScript works.

Get Mac OS X: The Missing Manual, Panther 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.