This article is more than 1 year old
Mac OS X 10.4 'Tiger in depth
Part two: Automator, AppleScript, iSync, iCal and Address Book
Review The Register's in-depth look at Apple's Mac OS X 10.4 Tiger continues. Last time, we looked at 10.4's headline features - Spotlight and Dashboard - and here we'll explore Automator, the latest attempt of the OS at system scripting.
Automator and AppleScript
In the early 1980s, computers were largely sold on the basis that they would be programmed by their owners. The rise of packaged software and growing numbers of purchases made by non-techies eventually killed that idea, but Apple has been one of the few companies to continue to bundle user-oriented programming tools long after users stopped communicating with their systems using BASIC commands.
HyperCard continued to be bundled on Macs through to the mid-1990s, but by then Apple had begun including AppleScript too, tapping into the Mac OS then new inter-application communications system and its existing system-wide macro facility. AppleScript was designed to make programming simple tasks easy by ditching abstruse programming languages in favour of plain English. AppleScript never became the BASIC of the 1990s, but it found a niche among people looking to automate content-creation workflows.
AppleScript has evolved ever since, taking on more features and morphing over time into something more like a 'true' programming language that the simple scripting language it started out as. This was cemented a few years ago when it became an official Mac OS X language for program development, courtesy of Xcode's AppleScript Studio.
The downside is that it has become progressively harder to use AppleScript if you're not a programmer. Mac OS X 10.4's Automator utility is about making it relevant to non-programmers again.
Automator is certainly impressive at first glance. You create Workflows - what might once have been called Scripts or macros - simply by dragging separate Actions onto flowchart. Actions are basic tasks, such as 'choose some files' and 'resize a picture', and derive from a range of Mac OS X's bundled apps, including Automator itself and Finder.
In essence, Actions are encapsulated chunks of AppleScript code that tie into the applications' existing scriptable features, along with the UI elements that Automator displays. But while you can save Workflows either as Automator documents or standalone apps, you can't edit them in Script Editor, Mac OS' bundled AppleScript writing tool. You can, however, embed AppleScript code into Workflows, along with Unix shell scripts.
The 'visual' programming metaphor is nothing new, of course, but it's no less welcome for that, and it once again opens Mac OS X, or elements of it, to non-programmers.
And to Apple's programmers, too. Tiger's PDF output options, accessed through the Print dialog are all implemented as a series of Workflows. If 10.4's printing system can tap into the Workflow engine, so can other apps, allowing Automator-created applets to form the basis for application plug-ins too.