APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Tiger's Automator

© December 2005 Tony Lawrence

Automator is Mac OS X Tiger's drag and drop programming thingy. I've never been a fan of such tools - they are almost always billed as "No Programming Necessary", which of course is nonsense. Any time you are telling a computer what to do, you are programming. Tell it something stupid, and you get stupid results. You need to have some intelligence to get what you want - drag and drop doesn't change that a bit.

"You don't have to write any code", they say.

Right. Except that you do.

Whether you are typing words or selecting "Actions" from pull-down menus, you are still writing code. Automator has no "if-then" capability, but it doesn't matter: you are writing code. If you write dumb code (like deleting something before you copy it somewhere else), you'll get dumb results. It also lacks any test and branch capability, but the return value of external scripts can stop it dead in its tracks, so that's control over execution, which means you have to think about what happens if a script does fail.. that's programming.

All silly tools like this offer is a protective cocoon that insulates you from typing words. It doesn't make your brain unnecessary, and it won't prevent stupidity any more than any compiler/interpreter does already. In fact, when things go wrong, this type of programming is even more confusing and less helpful than those awful "languages" that involve typing horrible words into a file!

Can you tell I'm not a big fan of Automator?

Without any if-then or loop capability, Automator could be more properly classified as a low level batch language. However, it does have the ability to call Applescript or shell scripts, and the results can be fed right back into the Automator stream for display or to be passed to another program or built in Automator action.

As an example of that, here's a fairly useless Automator program:

view of Automator program

The first part of this just presents a dialog box that lets us select a server. It's meaningless in this context; normally you'd follow that with some more useful action like "Get Specified URL's" (which would open Safari) or "Get Link URLs from Webpages". We want to pass the selected URL to a shell script. Unfortunately. Automator is quite fussy about these things: "Ask for Servers" outputs a "URL" type and shell scripts read "Text". You'd expect an automatic conversion, but Automator just hangs if you try to do that. I bet that will be fixed later, but for now, I put a "Copy to Clipboard" in between these two, which effectively converts URL's to Text. In case you didn't notice, that required thinking and doing more than Automator could do by itself: i.e., more programming.

The script we call doesn't do much:

  while ($g=shift @ARGV) {
    print "-- $g";
  exit 0;

The output of that comes back to "View Results". As I said, rather pointless, but of course our program could output different text based on its own decisions. It also has the ability to stop Automator as noted above: if that "exit 0" were instead an "exit 1", Automator would not continue to the "View Results" step, thus giving us a little more control. Not much, though.

I think Automator could be a nice GUI front end for some simple shell scripts. Obviously you can't get too complex.. but it might be good for some interactions. I'd probably rather use something like Platypus or iHook which would give me more control than Automator is able to provide.

All the hype about this prior to Tiger's release has come to very little. You might have thought that Apple expected a flood of Automator applications to follow, but it hasn't happened and isn't likely to. Automator is just too weak; a better name for it might be SemiAutomator.

That hasn't stopped at least two books from being published:

Got something to add? Send me email.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> Tiger's Automator

Inexpensive and informative Apple related e-books:

Digital Sharing Crash Course

Take control of Apple TV, Second Edition

Take Control of High Sierra

Take Control of Parallels Desktop 12

Are Your Bits Flipped?

More Articles by © Tony Lawrence

Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us

Printer Friendly Version

There are only two things wrong with C++: The initial concept and the implementation. (Bertrand Meyer)

Linux posts

Troubleshooting posts

This post tagged:

Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode