Quantcast
The video player requires Flash 8 Player or later. Please download the latest Flash Player.


Maclife Hottest Articles
Thumbnail
FEATURE
100 Snow Leopard Tips, Tricks, and Features
Browser
FEATURE
OS X Browser Speed Wars: May the Fastest App Win
iTunes History
FEATURE
The Complete iTunes History -- SoundJam MP to iTunes 9
iTunes Tips
FEATURE
iTunes 9 Tips and Tricks - Solve the Mysteries of the New iTunes
5 Indispensible Automator Actions
Posted 08/18/2009 at 4:14:47pm | by Johnathon Williams

automatorOf all the apps on your Mac that you're not using, the one you're missing the most is Automator. Put simply, Automator helps you eliminate boring, repetitive tasks by chaining together common actions into groups called workflows or actions. (For instance, a workflow might copy the currently selected JPG in the Finder, scale it down, and email it to someone.) Automator actions aren't limitless--not all software developers include them with their apps, and they can be difficult to debug. But they are surprisingly flexible and powerful. These five sample workflows should cut some of the drudgery out of your day, as well as demonstrate how to create your own custom workflows.

 

 

ACTION 1: Combine PDF files and extract all text.

 

PDF action screen

Knowing which actions play well together sometimes takes some trial and error.


Here's a handy workflow for anyone who works with text-heavy PDFs. First, open Automator (Applications > Automator), and choose Custom to create a new workflow. Creating workflows generally consists of two steps: getting your actions in the right order, and configuring those actions.

First, let's get our actions. In the Library pane (far left), click PDFs. For your first action, select Compress PDF Pages and drag it to the workflow space on the right. Then select Extract PDF Text and place it below the first action. An inverted triangle will connect the two actions, signifying that the output of the first will be fed as input to the second. (Not all actions can be chained together, but you often won't know until you try.)

Now let's configure the actions. In the extract action, set Output to Rich Text to preserve basic text formatting (bold, italics, etc.), and select a folder for the finished files with the Save Output menu. Finally, save the workflow as an application. Any PDF files dropped onto the application's icon will automatically be merged, and the text from the merged document will be saved as a new rich text file to the specified folder.

 

 

ACTION 2: Format, import, and organize your MP3 downloads.

 

import MP3s action

Automator can automatically organize new MP3s into date-based playlists. If only it could tell us whether the new songs are any good.

Since the recording industry abandoned its war on MP3s, our Downloads folder is routinely stuffed with new music from our favorite online stores and blogs. This workflow keeps new tracks from being forgotten before we get a chance to listen to them.

Create a new custom workflow (Command-N if Automator is already running), and select Music from the action Library. Drag the following four actions to the workflow space, preserving their order: Import files into iTunes, Change Case of Song Names, Set Options of iTunes Songs, and Update iPod. Each action should connect to the next.

The first action, Import Files into iTunes, is the most important. Creating a playlist is easy enough: We simply select New playlist from the dropdown menu. The real problem is what to call it. We need to generate a unique name for each new playlist. If we don't, we're no better off than we were with our Downloads folder. Fortunately, Automator supports variables, that is, placeholders for dynamic data. In the upper-left corner, click the Variables button, and choose Date & Times from the Library. Then drag the variable called Today's date to the text box in the action. In front of the variable, type Downloads for. Combined, the text and variable will create playlists in this form: Downloads for 7/6/09.

Text formatting in metadata such as song titles can be touch-and-go with downloads, so set Case to Title Case in the second action. In the third action, Set Options of iTunes Songs, adjust the audio presets to suit your tastes (we set Volume Adjustment to none and Equalizer to Rock, but your prefs may vary).

Finally, save the workflow as an application. Dropping a group of MP3s on the application's icon will import the files into a new playlist named after the import date, change all titles to title case, set the audio options to your preferences, and update any attached iPod.

 

 

ACTION 3: Import and resize your photos.

 

Import and resize image action

Upload now and edit later by importing and scaling photos in bulk.

Thanks to the megapixel wars, most digital cameras produce images that are much too large for quick uploading or emailing. This workflow imports photos from a digital camera, and scales them to a web friendly size.

Create a new custom workflow, and select Photos from the Library. Drag the Download Pictures and Scale Images actions into the workflow space, in that order. In the scale action, select To Size (pixels) from the dropdown menu, and enter a maximum size in the text box to the right. (500 pixels is the default size for photos posted to Flickr.)

To keep everything organized, we'll want to save our imports in their own folders. Select Files & Folders from the action Library, and drag New Folder to the bottom the workflow. Select the Pictures folder from the Where dropdown, and enter a name for the folder using the Today's date variable, just as we did in Action #2. Now save the finished workflow as an application. The next time your friends are clamoring to see last night's party pictures, plug in your digital camera and run the application. The resized photos will be a snap to email or upload.

 

 

ACTION 4: Archive and email.

 

Archive and email action

This workflow may only save you three clicks, but three clicks is a lot if you repeat them five or more times a day.

Of all our workflows, this is the one we use most often. Create a new custom workflow, select Files & Folders from the Library, and drag Create Archive to the workflow space. Then select Mail from the Library, and drag New Mail Message to the workflow space. In the Create Archive action, enter a custom filename for each archive, such as Files from Sarah. (For something a bit more dynamic, throw in a variable like we did in Action #2.) After the workflow is saved as an application, dropping files or folders onto the app's icon will create a new Mail message with the dropped material attached as a single zip archive. (For easier access to the application, drag its icon to your Dock.)

 

 

ACTION 5: Scrape webpages for MP3s (or other media of choice).

 

Scrape MP3s action

Periodically scraping your favorite music blogs for MP3s is a great way to stockpile music during the week for your weekend listening pleasure.

This workflow is most of the reason we're so dependent on Action #2. Most of our favorite music blogs link to MP3s, but since we spend all day in front of a computer, we prefer to sample new music while lying on the couch rather than sitting in front of the keyboard. This workflow automatically downloads all MP3 links from the active webpage in Safari.

Create a new custom workflow, select Internet from the Library, and drag these actions to the workflow space, in order: Get Current Webpage from Safari, Get Link URLs from webpages, Filter URLs, and Download URLs.

In the Get Link URLs action, uncheck the option to Only return URLS in the same domain as the starting page. In the Filter URLs action, select Path from the first dropdown, and select contains from the second. To download only MP3s, type mp3 in the text box. (To filter for other media types, replace mp3 with the file extension for your preferred format.) Select a download location in the Download URLs action, and save the finished workflow as a workflow. Click Run, and watch as your hard drive's free space disappears!

 

Download the above Automator actions here

COMMENTS
avatarThanks for the automator tips but do you have another....

Thanks for the pdf tip. My wife will really appreciate this then next time she has to edit a bazillion page pdf file. But yes I do have a request. Would love to figure out an automator action or applescript to toggle back to my mac on or off as it doesn't play nice with vpns and I lose a lotta clicks turning it on and off. Strangely I can't see _any_ automator actions for any of the system preferences panes. THought this would be ideal use.

Login or register to post comments
avatarCombine PDF's Typo

In your instructions you say to " select Compress PDF Pages" What you meant was "select Combine PDF Pages". What I'd really like to see are examples of more in-depth tasks using variables and the more powerful stuff Automator can do.  Explain how to apply more logic to the coding.

Login or register to post comments
avatarScrape for MP3

After running this workflow it is only returning me with URL's for the mp3 files playing on the page. Is it supposed to return with actual files or just the URL for each mp3?

Login or register to post comments
avataromega watches

Were not smart, but also learn from others bald.omega watchesChing had no water to fish, one to the cheap is invincible.replica watchI left Dragon, White Tiger right shoulder tattooed Mickey Mouse.replica watchesEfforts should be made! ! For your Audi Dior me.82jsa

Login or register to post comments