Mac OS X 10.4 'Tiger in depth
Part two: Automator, AppleScript, iSync, iCal and Address Book
Automator's flaw is that it's not extensive enough. Almost all of the applications supported by Automator have scope to do much, much more than the suggestedf by the sample Actions included with 10.4. Ditto non-supported but equally Scriptable apps. Third-parties will come to fill the gaps - but that's going to be of more use to professionals who were already using AppleScript to automate document workflows, than to novices.
Pros are likely to stick to AppleScript in any case, because Automator provides no control logic. It can't pass custom data between Actions, and there's no way of moving on to one Action rather than another on the basis of a user selection or the value of a variable. You can do this in AppleScript, of course, but you've got to learn the syntax first.
Hopefully, Automator will evolve quickly into a visual AppleScript generator, allowing savvy users to create branched, more interactive workflows without sacrificing the simple 'one step after the other' flow Automator imposes today. Until then, it's usage will be limited to the kind of tasks Apple already bundles pre-written AppleScripts - batch utilities for renaming files and folders, resizing pictures, that kind of thing.
What Automator can do, that AppleScript alone could not, is take those basic Workflows and apply them as plug-ins to other applications. I set up a simple Workflow to ask me if I want to do a back-up. If I say yes, it closes down all my Finder windows and opens a pair of Smart Folders that list the folders I want to make sure I have back-up copies of. I saved this Workflow as an iCal plug-in, and Automator creates a calendar entry with the Workflow set to trigger as the alarm. Now, every Friday at 11am, up pops a message asking me if I'd like to do back-up my data.
Well, that's how it should have worked. Most of this was actually achieved with an AppleScript embedded in the Workflow. Why? Because the Finder Actions bundled with Automator don't include basic tasks like closing windows. As I say, a huge range of basic functions accessible through AppleScript are not accessible through Automator. Apple has to expose all these features if Automator is to become more than a toy.
Apple has updated Script Editor too, but the results are largely cosmetic: in the main a nice new browser-style readout for applications' AppleScript dictionaries. AppleScript now has its own preference-setting utility, AppleScript Utility, which operate beyond Script Editor's domain, which is why they're implemented separately. Surely a System Preferences pane would be more useful - and more in keeping with Apple's own UI guidelines. But as we saw with the metal-skinned Finder, it's happy to ignore its own rules. Whatever, AppleScript Utility replaces all the little Folder Action set-up and Script Menu control scripts of old, even though they're still included...
Other tweaks to AppleScript include extensions to allow coders to work with XML, Apple's own .plist files and SQLite databases. User interactivity has been enhanced with new dialog options allowing sensitive data to be masked as it's typed, while ensuring AppleScript-generated dialog boxes are more in keeping with 10.4's overall look and feel. Tiger's Font Book font manager app is now scriptable.
Next page: iSync