Mac Automation: Automator for Leopard
A few people commented on my first Mac Automation post that they didn't understand Automator. This post will clear that all up.AppleScript is very powerful, but it has a learning curve. When Apple set out to make Automator, they tried to make an automation environment that not only gave the user flexibility, but also power. Apple includes several actions that programs can use; they also include a plug-in type model for developers of Mac software to add even more actions.With the introduction of Leopard, Apple completely re-invented Automator; giving it a better user interface and even more actions. Let's take a look at the Automator application:

The area in red is where the actions are located. These actions are what you link together to make a workflow. The area in blue is the workflow area. This area allows you to place your actions in the correct order to make a useful workflow. The yellow area gives you the information about the currently selected action; such as what it will accomplish and what action is needed before or after it.
Now let's try making a work flow of our own. Launch Automator and find the following actions:
- Take Video Snapshot
- Import Files into iPhoto
Next, drag the "Import Files into iPhoto" action into the work flow. Notice how the two actions are joined together by a little tab in the center (this means they are compatible actions). Select "New Album" from the drop-down box and name the label using the adjacent text box.
Once you have all the actions in place, click the Run button in the top right corner of the application window. The actions will run, producing a new iPhoto album with a snapshot from your iSight camera. And you've just created your very first Automator workflow.
This small workflow shows you the true potential of Automator -- whether for work (or play).
Share
var digg_url = 'http://digg.com/apple/Mac_automation_Automator_for_Leopard'; A few people commented on my first Mac Automation post that...
Add a Comment
I really want to like Automator; I really do. But it just seems so completely useless to me, especially when 99% of all examples of what you can do with it involve iPhoto, which I do not use.
December 26 2007 at 11:47 AM Report abuse Permalink rate up rate down Replythis was great, i never new how i could use automator and now i do..please more
December 19 2007 at 10:12 AM Report abuse Permalink rate up rate down ReplyThank you Cory for providing people a help to automate Apple tasks.
Your story has been nominated to appear on TodayNominated.com
Congrats
http://todaynominated.com/2007/12/19/mac-automation-automator-for-leopard-todaynominated/
I'd like to have a quick way (one click) to set time lapse to blackout the monitor. See, I can't put my computer to sleep at night because I use iCal to open a song in iTunes as an alarm clock. Instead of having to open the System Prefs pane each time, click on energy settings, then move the slider down to 15 minutes.
I thought the "watch me do" would be useful. It does everything except move the slider. D'oh!
I looked at AppleScript, but can't seem to find any preference object that reflects the energy settings.
Cheers!
Daniel
In the schedule options for power settings, you can tell the computer to automatically wake up at a certain time every day. No need for apple-script of automator. Here's a screen capture
http://screencast.com/t/ypumACoFofv
I've been rather pleased with Leopard's Automator. "Watch me do" is especially nice. With it, I was able to create a rather complex workflow that interacted flawlessly with Safari and the web.
December 18 2007 at 11:00 PM Report abuse Permalink rate up rate down ReplyI too had created an Automator Finder Plug-In to rename my picture files and it stopped working after upgrading to Leopard. In researching the problem, not only did I discover that this is a known bug in 10.5 and 10.5.1, but I also found out there is a much better and powerful tool to accomplish the same thing (and much more). The utility is called File List by Peter Maurer (creator of Butler) and can be downloaded for free here:
http://www.manytricks.com/filelist/
I love Automator here are some ones I did.
Image to Thumbnail- Just drop a set of files in a folder and they get thumbnails created for them.
Grab a comic daily - I wrote an automator script that would go to a particular website and download a comic strip for the day. I created a daily calendar entry to run at 6am and save the comic to a folder. The calendar entry was for a different group so it would not interfere with my actual calendar. You could do this with Windows using WGet,a VB or QuickBasic 4 complier, and the AT command.
Can Automator be used for complex actions? My current impression, after spending a few hours with it, is that it's lacking fundamental tools.
I'd like to Automate this process, but can't find a method:
1) Copy or move all MPG files from a digital camera to a user-specified folder
2) Open MPEG StreamClip, run the Batch Mode, select the moved video files and set options, and have the batch conversion operate
3) Import output MOV files into iMovie with user-specified Event name.
I'm stumped by the very first action: I can't figure out how to copy / move files to a user-specified directory. Every tool requires a hard-coded path. Worse, variables aren't variable! They can't be set dynamically, but are really constants pre-defined before the Automator script is run.
Automator's help file is weak and I can't find any tutorials or even good book recommendations. I'd love to get some insight into how to user Automator.
David,
1) If you want to specify the directory to choose, just choose the "Show this action when the workflow runs" option in either the "Copy Finder Items" or "Move Finder Items" action. Now you'll be able to specify which directory you want every time.
2) If you're on Leopard, you can specify the MPEG Streamclip app with Get Specified Finder Items and then do an Open Finder Items. After that, unless MPEG Streamclip has Actions (not likely), you'll need to use the Record feature to watch you do the selection (just put the files you copy/move into the same folder every time) and do a command-A to select them all, and then click Open or OK or Next or whatever the app uses to close the Open Dialog. Then you can specify your settings and run the batch command. All of this will be recorded until you go back to Automator and hit Stop. It'll then be compiled into an action called "Watch Me Do." (If this doesn't work, make sure that "Enable Access for Assistive Devices" is checked in the Universal Access pane of System Preferences.)
3) Do another recording of the Import Movies command in iMovie and stop it after you navigate to the output folder in the Save Dialog and click the Create new event: radio button. Now when the action runs, it will stop for you right at that point and you'll be able to type in the Event name.
Frustration beyond belief.
OK, in a final desire to inflict maximum cerebral torture I tried another work flow.
Created a new contact in Address Book. Assigned this contact one of my own email addresses. Gave this contact today as a birthday.
Automator - dragged in 'Find People with Birthdays'
dragged in 'Send Birthday Greetings'
Ran the work flow
Results - None.
Quit Address Book, restart AB, thinking maybe it might help.
Ran the work flow
Results - None.
Tried saving it as an iCal alarm as per Automator Help.
Ran the work flow
Results - None.
For something that is SUPPOSED to be so helpful, it ain't. Either that or I am REALLY missing something. Anyone with any ideas? For now, Automator is way off my list of things to play with.
Hot Apps on TUAW
Deals of the Day
more deals- Refurb Apple MacBook Air Laptops: 12" 64GB SSD for $699 + free shipping
- JVC Motion Sensing Clock Radio with Dual iPod Docks for $55 + free shipping
- Apple iPhone Headset with Mic for $4 + $2 s&h
- miFrame Picture Frame Dock for iPad for $64 + $8 s&h
- Refurb Apple iPod nano 8GB MP3 Player for $99 + free shipping, 16GB for $119
- Hannspree Apple-Shaped 28" 1080p LCD HDTV for $270 + free shipping
Software Updates
more updates- EFI Firmware Update brings Lion Internet Recovery to 2010-model Macs
- OS X Lion 10.7.3 released with Safari 5.1.3, Wi-Fi bug fix
- Aperture updated to 3.2.2, addresses Photo Stream issue
- Apple updates Keynote to address Lion issues
- Google Search app gets new look on iPad
- Apple releases Apple TV Software Update 4.4.3



33 Comments