How to Use MacBook’s Automator

By Mark L. Chambers

One popular feature in MacBook’s Mountain Lion — Automator — can save you a tremendous amount of time behind the keyboard. You use Automator to create applications with a relative of AppleScript called AppleEvents. (In case you’re not familiar with AppleScript, it’s the simple programming language that you can use to automate tasks and applications within Mountain Lion.)

image0.jpg

Of course, writing an application might sound daunting — akin to single-handedly building your own nuclear submarine over a long weekend — but Automator is actually easy to use. Heck, you might find it downright fun!

You can also create workflows, which are sequential (and repeatable) operations that are performed on the same files or data, and then your Automator application can automatically launch whatever applications are necessary to get the job done.

Here’s a great example: You work with a service bureau that sends you a CD every week with new product shots for your company’s marketing department. Unfortunately, these images are flat-out huge — taken with a 12-megapixel camera — and they’re always in the wrong orientation. Before you move them to the Marketing folder, you have to laboriously resize each image and rotate it, and then save the smaller version.

With help from Automator, though, you can build a custom application that automatically reads each image in the folder, resizes it, rotates it, and even generates a thumbnail image or prints the image, and then moves the massaged images to the proper folder.

You’d normally have to manually launch Preview to perform the image operations and then use a Finder window to move the new files to the right location. But now, with Automator, a single double-click of your custom application icon does the trick.

You find Automator in the Utilities folder in Launchpad (or, from a Finder window, in your Applications folder). Currently, Automator can handle specific tasks in more than 80 applications (including the Finder), but both Apple and third-party developers can add new Automator task support to both new and existing applications.

To create a simple application with Automator, launch the application and follow these steps:

  1. Select Application and click Choose.

  2. Click the desired application in the Library list.

    Automator displays the actions available for that application.

  3. Drag the desired action from the Library window to the workflow window.

  4. Modify any specific settings provided for the action you chose.

  5. Repeat Steps 2–4 to complete the workflow.

  6. Click Run (in the upper right) to test your script.

    Use sample files while you’re fine-tuning your application lest you accidentally do something deleterious to an original (and irreplaceable) file!

  7. When the application is working as you like, press cmd+Shift+S to save it.

  8. In the Save dialog that appears, type a name for your new application.

  9. Click the Where pop-up menu and specify a location where the file should be saved.

  10. Click the File Format pop-up menu and choose Application.

  11. Click Save.

    Your new Automator application icon includes the Automator robot standing on a document. Why, most normal human beings would call you a programmer, so make sure that you’re inscrutable from now on! If you’re going to use your new Automator application often, don’t forget that you can make it more convenient to use by dragging the application icon to your Dock or to your desktop.

To find all the actions of a certain type in the Library list, click in the Search box at the top of the Library window and type a keyword, such as save or burn. You don’t even need to press Return!

If your Automator application should run every time you log in — for example, the application tracks your time on a project — follow these steps to set up the application as a login item:

  1. Open System Preferences.

  2. Display the Users & Groups pane.

  3. Click the Login Items button.

  4. Click the plus button at the bottom of the list.

  5. Navigate to the location of your new Automator application.

  6. Click Add.

    Now your Automator application is really automatic. Watch your significant other gape in amazement as your MacBook begins to work without you touching the keyboard! (If you’ve added the application icon to your Dock, you can also simply right-click the icon and choose Options→Open at Login from the right-click menu that appears. Either way, your MacBook gets the message.)