OS X Leopard’s Quick Look feature is great—select any file(s), jam on the spacebar, and the contents of the file are revealed. This works with Automator as well.
Quick Look an Automator workflow, and a HUD pops up revealing the entire workflow content. In a nice touch, resizing the QL window dynamically scales the content (saving bitmaps). Note that QL only works on Automator 2.0 workflows; older workflows will need to be opened and resaved.
Systems Boy has posted a few Automator workflows that achieve the dork-meme of the week, creating text files via the contextual menu. I’m not sure why this is all the rage, but far be it from me not to get on the band wagon. It is certainly a handy function for the obsessive text-file-creating types (via Daring Fireball).
Helping set up for the AUPN launch party this weekend, I needed to load files onto 100 USB flash drives for the obligatory swag bag. To churn through it efficiently, we had an Automator workflow copy the files onto the drives. All I had to do was insert a drive, double-click the workflow app, wait until it copied the files and unmounted the drive, then unplug the drive.
After doing this a few times, it seemed silly having to manually run the workflow; I wanted it to run automatically when a drive was plugged in. Fortunately, the solution came to me in a flash (pun absolutely intended). More »
From Mac OS X Hints: “If you’d like to automatically get songs from MP3 blogs (to discover new music without pain), and you’d like to automatically add those songs to a pre-defined playlist in iTunes when the download ends (so you have just to fire up iTunes and click Play), well, this tip is the right solution for you.”
This is a nifty hack that uses Automator, Growl, and any number of downloading tools to add songs off the internet into iTunes.
- Open Automator, and click iPhoto.
- From the list of actions, select Ask for Photos, and drag it to the right-hand pane.
- Save this as a plug-in, and select Script Menu (the script menu that displays in the menu bar) so it is accessible anywhere. (If this menu is not visible, launch the AppleScript Utility in /Applications/Applescript, and check ‘Show Script Menu in menu bar.’)
Next time you need a picture from your iPhoto library, select this action from the AppleScript menu, and you’ll have a media browser that lets you do so without opening iPhoto.
MacWorld has a brief tutorial on how to “Turn your Mac into a musical alarm clock”. Aside from being a handy little workflow, it also illustrates how to schedule them to run when a sleeping Mac wakes up:
“Save this workflow as an application, open the Accounts preference pane in System Preferences, click the Login Items tab and drag your workflow to the login items list.
Open the Energy Saver preference pane, click the Schedule button, and choose the time to wake up your Mac. When it wakes up, the Automator workflow will run, telling your Mac to play the selected iTunes playlist.”
From MacOSXHints: “…choose the Automator plugin that you want to remain hidden while it runs, control-click on it, and choose Show Package Contents from the pop-up menu. Inside the Contents folder, open up Info.plist, and change LSUIElement from No to Yes (if using Property List Editor) — or change the line after the LSUIElement key line to
“If one of your workflows takes its sweet time, you might want Automator to notify you when some part of it has completed. The trick is to insert the Automator: Ask For Confirmation action after the relevant part of the workflow, forcing Automator to pause the entire workflow at that point. (You can also use the Ask For Confirmation action to pause your workflow so you can make changes to whatever itâ€™s working on.)â€
“…it appears that the ‘Get Selected Finder Items’ action has changed its behavior under 10.4.3, and not for the better…the problem is that the path returned by Get Selected Finder Items isn’t usable by the Run Shell Script action.
It turns out that if you take an action, any action, on the Finder selection, then the path will be correct. What’s the best action to add? One that doesn’t do much of anything — Label Finder Items, with the label set to None.”
“To store references, use the Copy to Clipboard action from System Library. Place this after the results you need to store. Then to call it up, place a Run AppleScript action in the workflow with the following scriptlet before the action that needs the data from earlier in the workflow:
--Return Clipboard Contents to Data Flow return (the clipboard)
This takes the information stored on the clipboard and puts it back in the Data Flow.”
Sean Long writes: “Add this snip of XML to /System/Library/Automator/Run Shell Script.action/Contents/Resources/Shells.plist. Now when Automator is restarted /usr/bin/ruby will show up in the Shells: list.” More »
If you develop or update your action library a lot, Automator’s action cache can become “confused,” leading to odd behavior. To force reload the actions, launch Automator while holding down the option key. Because workflows also store an action cache, misbehaving workflows should have their actions removed and replaced after the option launch has occured.
From MacOSXHints: “Apple’s Automator Action Installer template (available from Apple’s Installation Instructions for Developers page) is the recommended way to ship custom actions, and it works pretty well. However, one annoyance is its tendency to hide active apps when it runs. Luckily, the fix is easy.” More »
Double-clicking workflows that appear in the My Workflows folder in the Automator Library opens the document; but double-clicked applications are launched, rather than opened (a bug report has been submitted). A workaround for this is to drag the application into the workflow pane of an empty Automator document. The workflow will appear, ready for editing. This works for .workflow files as well, of course.