Automator Development tip

I’m working on a new set of Automator actions, and have discovered a small trick that makes the process much less tedious… I wish I had discovered this before developing Ottomate, as it makes the process of running/testing/debugging an action much faster.
When you are developing an Automator action in Xcode, and you ‘Run’ your project, Xcode launches Automator.app with your new Action automatically included in its collection of available Actions. It does this without actually installing your newly-built Action. Instead, it includes your Action by using the -action “Your Action.action” command line argument against Autmator.app when it launches.
How? Open you Automator Action Xcode project, and in the ‘Groups and Files’ Tree on the left, expand the ‘Executables’ node. You should see a single executable item there named ‘Automator’. Automator Action projects automatically set this up so that when you ‘Run’ or ‘Debug’ your project, Automator is launched with your Action available.
This is pretty convenient, but there’s still a major annoyance to developing your Action. Every time you ‘Run’ your project and Automator.app launches, you have to setup a Workflow that uses your Action so that you can test it. This can be a real pain, as you have to search for your Action and any supporting Actions, drag them to the Workflow area, and configure then with the correct parameters every single time.
You can partially alleviate this pain by saving your Workflow to your system once it’s setup properly. Then, every time you ‘Run’ Automator.app, you can click File -> Open Recent -> <your workflow name>. But that’s still an annoying step.
So here’s the tip.
- First configure your test Workflow containing your new Action and its supporting Actions as described above, and save it to your Desktop as test.workflow.

- Then, back in your Xcode project, under the ‘Files & Groups’ tree, expand the ‘Executables’ node and double-click the ‘Automator’ item. This opens the ‘Executable “Automator” Info’ window.

- Click on the ‘Arguments’ tab. Click the ‘+’ button below the Arguments table to add a new command line argument.

- Add the path to your test workflow, e.g.: /Users/itod/Desktop/test.workflow.
Now everytime you ‘Run’ your Automator Action Xcode project, your test workflow containing your newly-built action is auto-launched and ready to run.
This can shave some serious time off the tedious dev cycle of Action development.
About this entry
You’re currently reading “Automator Development tip,” an entry on Todd Ditchendorf’s Blog.
- Published:
- 11.19.06 / 1pm
- Category:
- AppleScript, Cocoa, Mac OS X, Objective-C
No comments
Jump to comment form | comments rss [?] | trackback uri [?]