Apple has a long history of making the automation of repetitive tasks easier on the rest of us. Beginning with HyperCard and AppleScript, and now with Automator, Apple has created custom programs to make your Mac even more friendly and powerful.
You’ll find the Automator application inside the Applications folder. The icon is that of a little blue robot (appropriately named Otto) ready for you to program using drag and drop. Automator works by taking a number of building blocks (called Automator actions) and combining them to build a workflow.
One of the more repetitive tasks you can do on a computer is prepare items for printing. We’re going to look at a few ways Automator can help out with these to get you started.
If you launch Automator in Snow Leopard, you’re presented with the following templates. I’ll show you how to create an action for printing the contents of a folder and combining Mail messages for printing.
Print a folder’s contents
New to Automator in Snow Leopard is the ability to create Services, which can be made available to any or specific programs through the Services menu (Application_Name -> Services). Automator makes it easy to get the contents of any folder on a Mac as a text file ready for printing, batch processing, or any other purpose.
Open Automator and choose the Service template from the initial dialog box. You’ll be in the Automator workspace, with the library of actions on the left and your building area on the right.
In the upper right, set ‘Service receives selected’ to ‘folders’ in ‘Finder.app’ using the popup menus.
From the list of Files & Folders actions, double click on Get Folder Contents (search for it in the Search box if you need to). You can choose to include subfolders here if you like. You’ll see the action placed into your building area. Note that you can also drag the action from the library and drop it in the building area.
Next, go to Text actions and double click on New Text File from the list. Give the file a name and a location to be saved. I chose ‘finder_list.txt’ and saved it on my Desktop. For more flexibility, under the New Text File action’s Options button, check Show This Action when the workflow runs and Show Only The Selected Items with both Save As and Where options (above) checked. Then, when you run the Service, you will be prompted with a dialog box asking where to save the file and what to name it.
(optional) Finally, under the Utilities actions, double click on Print Finder Items, and choose the printer you want to use. Note, though, that the file will print immediately, without any confirmation or settings panel, or with any ability to change which printer will be used. So you can omit this part and print the saved text file manually if you prefer.
Save the action as a Service with a memorable name; I used ‘FinderPrint.’ Automator will save the file inside your_user_folder/Library/Services.
Now Control-click on any folder in the Finder to run your newly created Service from the Services contextual menu. The contents of specified folder will be saved in a text file (one item per line), very useful in certain situations, and immediately sent to your printer if you added step 5. Note that this Service will only appear on a folder in the Finder, because we told it to do that back in step 2.
Combine Mail messages for printing
Here’s a three-action Automator application to combine multiple messages in Apple’s Mail into a single (new) e-mail message. You can then print this single message, which saves tons of paper.
Launch Automator and choose the Application template.
Go to the library of Mail actions.
Double-click (or drag and drop) the Get Selected Mail Items action.
Then, move the Combine Mail Messages action into the building area.
Add the New Mail Message action into the building area. You don’t need to fill in any of the mail header information, since you’re not actually going to send this message to anyone but the printer.
Save the new program as an Application when you’re done, wherever you wish. I named mine ‘Mail-combine.app’ and put it in my Applications folder.
To use this, first select the messages you want in Mail. They will be put into the new message in the order you see in your Mail window (top to bottom), so sort the messages accordingly first. Then double-click the Automator application, and voila, you will have a new Mail message with all your chosen messages combined. You can then save or print as you please.
These are just two of the endless ways you can use Automator to make printing faster and more convenient. Once you’ve tried some Automator workflows, I’m sure you’ll get ideas of ways to speed up other applications and workflows you use.
There’s plenty of information out there about Automator for OS X 10.6 and OS X 10.5, and of course I hope you can join us at Mac OS X Hints for even more Automator goodness.