Printers

Use Automator to simplify printing tasks

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.

This is the Automator startup screen.

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.

This is the main Automator workspace.

  1. 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.
  2. In the upper right, set ‘Service receives selected' to 'folders' in 'Finder.app' using the popup menus.
  3. Here's what it should look like.

     

  4. 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.
  5. 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.
  6. (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.
  7. Save the action as a Service with a memorable name; I used 'FinderPrint.' Automator will save the file inside your_user_folder/Library/Services.
  8. 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.

The action you created is in the of the Services menu.

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.

  1. Launch Automator and choose the Application template.
  2. Go to the library of Mail actions.
  3. Double-click (or drag and drop) the Get Selected Mail Items action.
  4. Then, move the Combine Mail Messages action into the building area.
  5. 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.
  6. 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.
  7. 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.

The Mail message combining application.

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.

[Craig Arko is the editor of Mac OS X Hints.]

Product mentioned in this article

(1 items)

Subscribe to the Best of Macworld Newsletter

Comments