Hardware Reference
In-Depth Information
Note: Although it's often lumped together with AppleScript (which I discuss later in
this chapter), Automator is a completely independent technology that just happens to
be capable of many of the same things.
For example, a workflow can:
• Convert text files and graphics into an ebook in EPUB format
• Create a graphic from a word or phrase
• Import all the images from a Web page into iPhoto
• Create and mount a new disk image
• Convert a movie file to a size and format suitable for your iPhone or iPad
• Create an audio file with a synthesized voice reading the contents of a text file
• Add a 1-pixel gray border around any graphic (that's how we put the borders on
most of the graphics in Take Control books!)
Workflows are made from building blocks called actions . Automator itself includes many
actions, as do a number of the apps bundled with OS X (such as Calendar, Contacts, Mail,
iTunes, and Preview). Just as a third-party app may or may not include AppleScript support,
some apps come with their own Automator actions and some don't. A few third-party apps
with good Automator support are BBEdit, DEVONagent Pro, DEVONthink Pro Office,
LaunchBar, Microsoft Office 2011, Pixelmator, and Transmit. In addition, actions can
optionally contain instructions written in numerous programming and scripting languages,
including AppleScript, Perl, Python, and Ruby, and shell scripts .
I'llshowyouhowtomakeasimpleAutomatorworkflow.ThenI'lltellyouaboutsomeofyour
other options, where to find existing workflows that you can use as-is or modify to meet your
needs, and how to learn more about Automator.
Tip: If you're unsure whether Automator or AppleScript is the best tool for a certain
automation task, my advice is to try Automator first, because it's so much easier to
use. If you get stuck, you can fall back on AppleScript (possibly even including the
necessary AppleScript code as part of your Automator workflow).
Create a Simple Automator Workflow
For an easy (yet somewhat fancy) introduction, we'll create a workflow that asks you to type
some text, and then speaks it back to you.
Search WWH ::




Custom Search