Just Posted: Introducing Chirpie for iPhone

Automator and Finder interactions in OS X 10.6

With the introduction of Snow Leopard – Apple’s new operating system, many significant changes have arrived, but also some tweaks to existing functionality. In this article I’m going to give a rundown of a new and interesting ways that Automator workflows can now run within the Finder and other applications.

OS X 10.5 – Leopard

In 10.4 and 10.5 Leopard,  Automator workflows could be run within the Finder on selected files or folders. Creating them was a simple enough task – drag and drop in the familiar Automator way, and saving them as Finder workflows. To run them, you simply highlighted the files or folders you wanted to interact with, and select the sub-menu item of your custom workflow:

Automator Workflows in Finder - OS X 10.5

Automator Workflows in Finder - OS X 10.5

This worked great – if a little bit long winded when drilling down through the menu’s to take an action. What I also found was that it took a bit of time for any workflow to run, basically because OS X needed to load that workflow and its supporting code. You did get a nice bit of visual feedback though in the menu bar telling you that the workflow was running.

This has pretty much all gone in Snow Leopard 10.6.

OS X 10.6 – Snow Leopard – Services

So with Snow Leopard you now have a new choice, to build a Service. Services are contextual workflows available throughout Mac OS X. They accept text or files from the current application or the Finder. Services appear in the Services menu available from the Apple icon in the top left.

This isn’t new – but what is new is the way that Finder services become part of the contextual menu:

Finder-contextual-menu-10.6“Set Folder View” being the name of my Automator Workflow. Even better, this is on the first contextual menu, not the 3rd like in 10.5 – it’s right there with Open, Copy etc…

Putting it together

Actually, this isn’t that hard, first up – select the “Service” option from the Automator template window:

automator-template-select

Once selected, create your workflow, on the assumption that you will be receiving file or folder selections form the Finder:

automator-step-1

Edit this section at the top of your workflow

Once your workflow is complete, simply save it:

automator-save

Once saved, your new Service now appears in the Finder contextual menu, or under the Apple -> Service menu.

Finder-contextual

Your saved services can be found in “Macintosh HD -> Users -> YourUsername -> Library -> Services”

Performance

So I mentioned performance previously, in 10.5 workflows took upto 30 seconds to begin running. Not with 10.6! Finder has been rebuilt from scratch – firstly it’s now all Cocoa code, and secondly – it’s 64-bit! Finder on its own is now a pretty slick beast – but with these new added Services running within it, rather than outside of it – they run pretty much instantly.

Even highlighting multiple folders to run a workflow against is instant – whereas before it would cycle through each folder and take upto a minute to complete.

This is an awesome minor enhancement on Apple’s part for Snow Leopard 10.6. Automator workflows are now truly integrated with the Finder, and not only that – you can integrate the Services with any application – as long as the Service receives files, folders or text to handle. Excellent!

8 Responses to “Automator and Finder interactions in OS X 10.6”

  1. Eric says:

    Many thanks for this. I had an existing Automator script for converting NMEA files to GPX and tried to use it on Snow Leopard for the first time today.

    I could see how to make it work with anything other than a Keyboard shortcut until I found your article. It was a very easy process to convert it to a Finder Service Item.

    Cheers

  2. scoon says:

    Hey great article, thanks.

    I have (…er, had) an automator script to rename objects from firefox’s cache and save ‘em into iTunes, was wondering where it went until I got here.

    Now I’ve got a keyboard shortcut which takes the place of a right-click, scroll down, right and click! Fantastic! You’re right about the speed of processing the workflow too. Great stuff.

    Thanks a bunch.

  3. jo says:

    funny
    works as you describe it, however my context menu looks different on a folder
    much more and the services are at the very bottom in a submenu…

  4. visitor says:

    Thanks! Just what I needed to know…

  5. Brandon says:

    Great article. This is exactly what I was looking for, but I couldn’t find a good write up. I used Automator a lot and noticed that my actions were gone from the right click menu, this does the same thing only faster. Nice upgrade, I just wish I had found this sooner to explain the upgrade.

  6. CrazyDog says:

    Thanks to you, I managed to add my little script eraseOptical to the contextual menu in Finder.

    This is the code :

    Service receives selected “files or folders” in “Finder.app”

    Run shell script:
    To run in /bin/bash
    Pass input to : stdin
    Code : “hdiutil burn -erase”

    Greetings from Belgium

Trackbacks/Pingbacks

  1. [...] Read the rest here: Automator and Finder interactions in OS X 10.6 [...]

  2. [...] Snow Leopard came some nice refinements to automator actions. However, all existing automator actions had to be recreated as services in [...]

Leave a Reply