May 20, 2005

Automator Madness

I thought, and still think, Apple’s Automator is a great idea whose implementation has fell a little short in the Tiger (10.4) release of OS X. I have been dissapointed twice with both failures stemming from the same problem: object type mis-matches between desired actions.


My latest effort was simple enough: get the selected mail messages, grab a specific header out of each one and pass it to a shell script. Cranking up Automator it doesn’t take long to identify three seemingly useful actions:



  • Get Selected Mail Items

  • Combine Mail Messages

  • Run Shell Script


So, click, click, click and then type in a short shell script. Voila…or so me thinks. Run Boom. Unable to convert mail item object to mail message object. Good Grief. Using the View Results action led me to believe i could take the Mail Items output and convert it to Mail Messages by inserting a Run AppleScript action.


Several lines of AppleScript later, the light-bulb popped. I can accomplish this task using only several lines of AppleScript. Furthermore, Automator isn’t needed to do that. <sigh>


Ten lines of AppleScript was all that was needed. While that speaks highly of AppleScript and the application scripting interface, it makes Automator look pretty dumb.


0 comments: