Hardware Reference
In-Depth Information
Use a Macro Utility
Earlier, in Use OS X Automation Technologies , I discussed AppleScript and Automator, two
tools that can control numerous other apps and tie multiple actions together into easy-t0-run
shortcuts. Both of those technologies are powerful, free, and included with OS X. But
AppleScript's learning curve precludes casual use, while it's limited by the capabilities various
apps choose to expose. Automator is far easier for a beginner to use, but it, too, has a fairly
constrained palette of capabilities—and not all the tasks you might wish to automate fit its
“workflow” mold. Meanwhile, apps like Excel and Nisus Writer Pro have fantastic automation
capabilities built in, but they're largely confined to activities within those apps.
So we come to a category of automation tools that—at the risk of overstating my
case—transcends these limitations. If you just want to get the job done—not necessarily in the
most programmatically elegant way but in a fast, reliable, and flexible way—you want a macro
utility. It's the sort of tool I reach for most often for general-purpose automation tasks.
Like other kinds of tools covered in this topic, the idea of a macro utility is straightforward.
You pick an action, or a series of actions, from a list; these form the macro's task. Then you
pick one or more events to trigger that action—a keyboard shortcut, a button click, a change in
network settings, or whatnot. That's it: you have a macro.
What's interesting about the utilities discussed in this chapter is that the lists of potential
actions they offer as building blocks for macros are quite long and diverse. Some of these
actions, similar to AppleScript verbs and Automator actions, directly control a particular
app (iTunes, Safari, the Finder) or send instructions to OS X (shut down, change display
brightness, switch users). Others manipulate behind-the-scenes resources (clipboards,
variables, strings) or manage the flow of steps (if/then/else conditionals, loops, subroutines).
Still others “play” the visible interface, simulating button presses, menu commands,
keystrokes, and mouse movements.
Put all this together and you have a toolkit that—with a bit of cleverness and patient
testing—can automate almost any repetitive Mac task that doesn't require creativity or human
intuition. Just a handful of examples, all of which can be done with a single click or keystroke:
• Remap keys on your keyboard to perform different functions
• Show the screen of a shared Mac
• Force a “stuck” Trash to empty
 
Search WWH ::




Custom Search