Keyboard Maestro
Conduct your Mac Like a Pro!
A Macro executes a sequence of Macro Actions in series. There are many actions to choose from (detailed below), some simple actions, for example Sleep Computer, require no other information and simply do their job, while other more complex actions, for example Select Menu Item, require you to specify more information, such as a target application or menu name.
There are many powerful Macro Actions available for your use, and you can sequence them together to perform complex tasks.
Process Control actions allow your to switch, quit, or hide applications. The actions are:
Interface Control actions allow you to interact with the user interface, selecting menus, clicking buttons, simulating keystrokes and so forth. The actions are:
iTunes Control actions allow you to interact with iTunes, playing songs, stopping or pausing, rewinding or fast-forwarding. All actions will launch iTunes if it is not already running. The actions are:
System Control allows you to control your Mac. Most are pretty self explanatory. The actions are:
Open actions allow you to open files, folders, URLs or System Preference Panes. The actions are:
Execute actions let you execute AppleScripts, Unix scripts or Automator Workflows. Unix scripts can be any kind of script, sh, zsh, tcsh, perl, python, and so on. The actions are:
If the AppleScript or Unix script generates any results, they can be optionally displayed in a floating window or briefly ina HUD window. For example, you could have a unix script date display briefly in a HUD window every hour.
These powerful actions allow you to add any new facilities we have not provided for, stringing them together with other actions as desired.
Clipboard actions let you insert text (the text is placed in the clipboard, pasted in, and then the clipboard restored) or use a named clipboard. The actions are:
The Insert Text action can be very useful to insert standard text templates, such as your signature, address, copyright or other boilerplate text, and so on. If you ever get email from Peter, you will probably notice that many of his emails end with “Enjoy, Peter.” - with the amount of email he deals with, you don’t think he types that in every time do you?
Insert Text can expand various tokens, including dates in any ICU date format. For example, we use an Insert Text action to insert the copyright message at the tope of code files:
/* * Created by %UserName% on %ICUDateTime%EEE d MMM yyyy%. * Copyright (c) %ICUDateTime%yyyy% Stairways Software. All rights reserved. */
Keyboard Maestro includes several powerful switchers, including Program Switcher, Window Switcher, and Copy, Cut and Paste Clipboard Switchers.
Each of these switchers is actually just a macro action, triggered like any other macro. By default Keyboard Maestro creates a Macro Group called Switcher Group which includes the following macros:
You can create your own macros using these actions or adjust their triggers within the Switcher Group.
Unfortunately, the system program switcher uses command-Tab with no way to disable it, so that hot key is not available for your use, which is kind of ironic since Keyboard Maestro and its predecessor, Program Switcher, were providing this functionality long before it was available as part of the system software.
Recording is a new facility introduced in Keyboard Maestro 3. It allows Keyboard Maestro to watch you as you perform a task and create the actions to produce a similar result.
Record Quick Macro is a variant of this that you can activate at any time without even launching Keyboard Maestro. You trigger the recording, and then perform a series of actions, and then turn off recording. Then press the associated hot key to replay the recording.
By default, Keyboard Maestro creates a macro triggered by control-F1 which executes the Record Quick Macro action with a hot key of option-F1. So for example, if you press control-F1 to start quick recording, type “hello” and then press control-F1 again to finish recording, then Keyboard Maestro will type “hello” each time you press option-F1.
Because you cannot see or edit the recorded actions, it is best to keep them very simple. A good rule of thumb would be not to touch the mouse, just use the keyboard.
For example, say you wanted to quote dozen different words in a paragraph, you could click in the middle of the first word, press control-F1 to start quick recording, type option-left arrow, quote ("), option-right arrow, quote ("), and then control-F1 again to finish recording. Now click in the middle of each remaining word and press option-F1.
The Pause action lets you pause in the middle of a sequence of actions. You can use this to get a visual break in your sequence of actions (eg for a slideshow), or to allow time for the applications affected by previous actions to "catch up" before continuing.