Mac OS X’s built-in automation tool, Automator (found in /Applications), is capable of performing wondrous feats in Snow Leopard, yet too many people ignore it – believing that the program is too difficult to use or their work wouldn’t benefit from automation. Neither is the case, as shown by these tips.
1. Get to your media more easily
If you spend much of your time working with Apple’s iLife and iWork suites of applications, you’re probably accustomed to having your media close at hand via the Media Browser – a pane that displays the contents of your movie, photo, and iTunes libraries, allowing you to easily use these elements in your projects. Yet when you want to access these files with a different application, the pane is absent. It needn’t be if you get a collection of Automator services.
Go to the Mac OS X Automation website and download the Media Picker Services collection (www.macosxautomation.com). When you install it, you’ll discover that the Services menu – found under the application name – includes three new entries: Browse iTunes Library, Browse Movie Library, and Browse Photo Library. Choose the most appropriate for your needs, and a Media Browser window will open. Select the file you want and drag it into a document.
2. Listen to your documents
Snow Leopard includes a handy Automator service that lets you turn text documents into an audio format. This is a great way for people who are always on the move, as well as those with visual impairments, to access text documents. To use it, launch System Preferences, select Keyboard, click on the Keyboard Shortcuts tab, and select Services in the first column. Scroll down to the Text heading and enable the Add To iTunes As A Spoken Track service. Now open a text document that you’d like to save as an audio file. Select all the text, choose Services from the application’s menu (for example, BBEdit > Services), and then use the Add To iTunes As A Spoken Track command.
An Automator workflow kicks in that uses Mac OS X’s built-in text-to-speech feature to convert the text to audio and then save the file to iTunes. You’ll find it under the new Spoken Text playlist with the name Text To Speech.
3. Try an automatic slideshow
Automator includes an Image Capture plug-in that lets you perform some really astonishing actions. In iPhoto, create an album (File > New Album) called Today’s Pictures, for example. Open Automator, create a new workflow, and in the template chooser select Image Capture Plugin. Click on the Photos item in the Library column and create a workflow that contains these steps: Review Photos, Import Files Into iPhoto, Get Selected iPhoto Items, Play iPhoto Slideshow.
In the Import Files Into iPhoto action, choose your Today’s Pictures album as the destination for your pictures. And in the Get Selected iPhoto Items action, choose Albums from the Get Selected pop-up menu (this causes the action to be named Get Selected iPhoto Albums). Save your workflow (File > Save) with the name Review And Slideshow.
Now connect a camera to your Mac. Open Image Capture (found in /Applications), and from the Import To pop-up menu at the bottom of the screen choose your Review And Slideshow workflow. Select some images and click on the Import button. An Image Review window will appear that displays the first image, along with – among other things – Reject and Approve buttons. Click on the appropriate button and continue to review your images. When you’ve finished reviewing the images, iPhoto launches, adds the images to the Today’s Pictures album, and displays a slideshow of the approved images.
Fond of the iLife and iWork Media Browser? Download a free Automator workflow, and you can access the media browser from many more applications
4. Extract text from PDFs
If you’ve ever wanted an easy way to get text from a PDF file into a text file, Automator provides a neat solution. Create a new Automator workflow, and in the templates sheet choose Application. Add these actions to the workflow: Get Selected Finder Items (found under Files & Folders in the Library column) and Extract PDF Text (under PDFs in the Library column). In the Extract PDF Text action, choose Rich Text as the output option – the text will look better this way.
Select an output destination – a folder called ‘PDF Text,’ for example – from the Save Output To pop-up menu. Then save the Automator application to your desktop. When you’re ready to convert a PDF file, just drag it on top of the Automator application you created. In a short time, all the text from that PDF will be extracted and placed in a new text document within the target folder. You’ll have to clean up the text, as the text will contain odd characters and formatting.
5. How to set up a folder backup routine
You should know by now how important it is to have a long-term, regular backup plan in case your hard disk fails. But sometimes you may be working on an ongoing project that requires the extra security of more frequent backups. The following step-by-step Automator workflow will do just that by taking items placed in a particular folder and backing them up to a connected external hard drive.
Step 1. In the Finder, create a folder on the Desktop and give it an appropriate name – For Backup, for example. On another drive, create a separate folder and call it something like Backed Up.
Step 2. Launch Automator. When prompted to choose a template for your workflow, select iCal Alarm. In the workflow area, string together these three actions: Get Specified Finder Items, Get Folder Contents, and Copy Finder Items. Click on Files & Folders to reveal these items in the Actions column.
Step 3. Drag your For Backup folder into the Get Specified Finder Items action so Automator understands that it’s the source folder. Next, drag the Backed Up folder on to the pop-up menu of the Copy Finder Items action. In the Copy Finder Items action enable the Replacing Existing Files option.
Step 4. In plain terms, the workflow will now take the items in the For Backup folder and will copy them to the Backed Up folder on the other drive. When those files are copied to the backup folder, any files with the same name in the Backed Up folder will be replaced. This ensures that only the most recent version of your files are backed up.
Step 5. Save and name your workflow – Daily Backup, for example – and iCal will launch automatically. Your workflow will appear in an Automator calendar – iCal will create one if it doesn’t exist already – scheduled at the current time and date.
Step 6. Still in iCal, select the Daily Backup event that was just created and choose Edit > Edit Event or type Cmd-E. In the resulting window, go to the Repeat area and choose Every Day so that the workflow will run once a day.
Step 7. In this same window you’ll also see an Alarm area. Here you’ll find that your Daily Backup workflow is scheduled to be triggered at the time that you saved it. Change the time to something that is more convenient for your routine, such as at the end of your working day – 6pm, for instance. If you’d like the workflow to be triggered more than once a day, just add additional alarms.
Step 8. When creating additional alarms you’ll be asked to locate the Daily Backup workflow (when you select the Open File command within the Alarm area). You’ll find it by following this path: youruserfolder/Library/Workflows/Applications/iCal. Obviously, you’ll want to change the time that the second alarm triggers the workflow – 11am, for example.