Keyboard Maestro 6 IconKeyboard Maestro 6

Conduct your Mac Like a Pro!

Macro Actions

Overview

A Macro executes a sequence of Macro Actions in order. There are many actions to choose from, and these are detailed below. Some simple actions, such as Sleep Computer, require no other information and simply do their job, while other more complex actions, such as 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.

To add an action, edit your macro, click the New Action button, or equivalently the + button below the detail view. This will show the lists of possible actions.

To see all actions, select the All Actions category. To select just your favorite actions, select the Favorites category. You can drag actions into your Favorites category. To see plug in actions that you have added to Keyboard Maestro, select the Third Party Plug Ins category.

Double click or drag one or more of the actions to add them to the action list for the currently edited macro.

Some actions are simple and do not require any configurion (eg Shut Down Computer). Other actions require you to specify parameters to the action, such as which window to move and by how much. You do this by editing the values for the action.

In Keyboard Maestro, there are two kinds of processed fields in actions, text token fields and numeric calculation fields. Most text fields are text token fields. Most numeric fields are calculation fields.

Text token fields typically (but not always) have an Insert Token pull down menu, and are always somewhat long. They are designed to allow you to enter a defined text item, rather than a numeric value. In these fields you use text tokens, which are marked with percents, like %CurrentClipboard% or %Variable%My Variable%. You can insert a text token from the Insert Token popup menu, or by choosing Insert Token from the Edit menu, see the Text Tokens section.

Numeric calculation fields are usually small to start off with (assuming they contain only a number), and usually have a stepper (double arrows) next to them. They are designed to allow you to enter a specific numeric value. In these fields, you can type a raw calculation. As soon as you type anything other than a digit, they expand to a larger size to allow for a calculation. Calculation fields never use percent tokens, but they can include variables or functions. You can insert a function or variable by choosing Insert Function from the Edit menu, see the Calculations section.

If desired, you can include a calculation in a text token field by using a %Calculate% token like %Calculate%1+2%. You can never use text tokens in a calculation field.

Application Control

Application Control actions allow your to switch, quit, or hide applications. The actions are:

Activate Last Application
switches back to the previous application you were in.
Activate Next Application
switches to the next application (alphabetically).
Activate a Specific Application
launches if necessary and brings the specified application to the front, optionally reopening the initial windows. If the application is already at the front, the action can optionally switch out, hide or quit it, allowing you to toggle an application. Very useful for utilities like PCalc.
Bring Application Windows to Front
brings all the windows of the current application to the front.
Quit All Applications
quits all foreground applications, optionally honoring the excluded application list.
Quit Other Applications
quits all foreground applications except the current one, optionally honoring the excluded application list.
Quit a Specific Application
quits the specified application, optionally force quitting or relaunching.
Hide All Applications
hides all foreground applications, optionally honoring the excluded application list.
Hide Other Applications
hides all foreground applications except the current one, optionally honoring the excluded application list.
Hide Front Application
hides the current application.
Hide a Specific Application
hides the specified application.
Show All Applications
shows all foreground applications.
Show a Specific Application
shows the specified application.

Clipboard Actions

Clipboard actions let you manipulate the system clipboard, Named Clipboards, the clipboard history and cut, copy or paste clipboard items. The actions are:

Cut, Copy, Paste
simulate Command-X, Command-C, or Command-V keystrokes to Cut, Copy or Paste to/from the system clipboard.
Set Clipboard to Past Clipboard
set the system clipboard to a previously copied item.
Set Clipboard to Text
set the system clipboard to plain or styled text. Text Tokens are provided to include such things as the time or date.
Set Clipboard to Variable
set the system clipboard to the value of a variable.
Delete Current Clipboard
delete the current clipboard, replacing it with the previously copied value from the clipboard history. This can be used to restore the system clipboard after another action sets the clipboard temporarily.
Delete Past Clipboard
delete a past system clipboard. This can be used to restore the system clipboard after another action sets the clipboard temporarily.
Cut, Copy, Paste to/from a Named Clipboard
cut, copy or paste to/from the specified Named Clipboard.
Copy (Named) Clipboard to (Named) Clipboard
copy the system or a Named Clipboard to the system or another Named Clipboard.
Apply Style to (Named) Clipboard
apply a style (like font or size or underline) to (a section of) the system or a Named Clipboard.
Apply a BBEdit Text Factory
apply any saved BBEdit Text Factory to the system or a Named Clipboard.
Filter (Named) Clipboard
apply one of a set of Filters to the system or a Named Clipboard.
Search and Replace (Named) Clipboard
search and replace the system or a Named Clipboard, optionally using regular expressions, and allowing Text Tokens. The replacement can also include $1 tokens for regular expression replacements.
Search (Named) Clipboard
search the system or a Named Clipboard using regular expressions, and capturing the results.
Substring of (Named) Clipboard
extract a substring of the system or a Named Clipboard.
Display (Named) Clipboard
display the system or a Named Clipboard in a window.

Control Flow Actions

You can control the flow of a macro execution using a variety of actions, from a simple Pause for a number of seconds, through a complex nesting of If/Then/Else and looping.

The actions to control the flow of a macro are:

Pause
pause for a number (which may be a calculation) of seconds.
Pause Until
pause until conditions are met.
Until
execute a list of actions until conditions are met.
While
while conditions are met, execute a list of actions.
Repeat
repeat a list of actions a number (which may be a calculation) of times.
If Then Else
if conditions are met, execute a list of actions, otherwise execute another list.
For Each
loop over a collection of values.
Execute a Macro
execute another macro (like a subroutine).
Cancel All Macros
Cancel all macros that Keyboard Maestro Engine is currently executing.
Cancel This Macro
Cancel this macro (including any macro that executed this macro).
Cancel Just This Macro
Cancel just this macro, continue executing a macro that executed this macro.
Break From Loop
Cancel execution of the current loop, and continue execution after the loop.
Semaphore Lock
Wait and lock a semaphore to ensure exclusive access/execution.
Semaphore Unlock
Unlock a semaphore (happens automatically if macro terminates).
Semaphore Reset
Forcefully reset a semaphore.

You will often need to use the Pause action to slow down replaying of an action sequence to allow the system time to catch up—especially after you have changed applications or if you want to use a mouse click.

The condition clause of the flow control actions can be any of:

If there are no conditions in the set at all, the action will not execute anything except the Until action which will execute the actions once. Neither side of the If Then Else will execute.

There is over a dozen different kinds of conditions, from testing what the current application is or examining variables or the clipboard, to checking your network location or testing a pixel on your screen, see the Conditions section.

The For Each action loops over a set of collection items, setting a variable to each value and executing the contained actions. The collections can include:

The control flow actions include a nested list of their own actions to execute, and that nested list can include further control flow actions—go wild! But keep in mind, there may be a time when a shell script or AppleScript is a more useful way of describing your solution.

See also the Conditions, Variables and Calculations sections.

Debugger Actions

Keyboard Maestro includes a built-in Macro Debugger which allows you to observe and control the progress of a macro in action. As well as using the Macro Debugger normally, you can use any of these actions, triggered by any method you like, to control the debugger.

Start, Finish, or Toggle
start or finish debugger, or toggle the debugger on or off.
New Macros Paused or Run
control whether new macros start paused (while debugging).
Breakpoint This, All or Other Macros
pause the specified macros in the debugger.
Step Over, Into or Out Other Macros
step other currently executing macros.
Continue This or Other Macros
resume executing specified macros.

Note that regardless of whether a macro would otherwise be paused, these actions will always execute. So, for example, even if you have New Macros Paused, macros that start with these debugger actions will still execute the action.

See also the Macro Debugger section.

Mail Control Actions

Mail Control actions allow you to interact with Apple Mail, send messages or set mail flags. The actions are:

Send Mail Message
send (or create) an email message, complete with optional attachment.
Set Mail Flag/Flagged/Read/Junk Status
set the flags on the currently selected mail message.

Note that the currently selected mail message is not necessarily the front window, it may be a message selected in the viewer behind the front window, especially if the front window is a reply or new message.

Execute Actions

Execute actions let you execute AppleScripts, shell scripts, Automator Workflows, JavaScripts or another macro. Shell scripts can be any kind of script: sh, zsh, tcsh, perl, python, ruby, and so on.

The actions are:

Execute AppleScript
execute a specified AppleScript, either from a file or text. For example, say "hello".
Execute a Shell Script
execute a specified shell script, either from a file or text. For example, pbpaste | pbcopy.
Execute JavaScript in Safari or Google Chrome
execute a specified JavaScript, either from a file or text. For example, alert("hello").
Execute Automator Workflow
execute a specified Automator Workflow.
Execute a Macro
execute a specified macro. This allows you to create subroutines of instructions. The current macro waits until the submacro finishes, or optionally execute asynchronously while the macro continues on.

The results of an AppleScript, shell script or JavaScript can be:

For example, you could have a shell script date display briefly in the Notification Center every hour, or use a hot key to type the results directly into your text editor.

These powerful actions allow you to add any new facilities we have not provided for, stringing them together with other actions as desired.

You can also use the clipboard by piping from pbpaste and to pbcopy.

Shell scripts are executed in the background and can access variables by using environment variables, see the Variables section.

AppleScripts are executed in the background via osascript. This means they are not allowed to do user interaction. You can work around this by asking an application like System Events to do the user interaction for you, for example:

tell application "System Events"
  activate
  display dialog "Hello"
end tell

AppleScripts can access variables by using environment variables (using system attribute) or by talking to the Keyboard Maestro Engine, see the Variables section. Note that AppleScript’s system attribute is not safe for international characters, although can use code like:

 set v to do shell script "echo $KMVAR_Variable"

JavaScript can access variables by using the document.kmvar dictionary, see the Variables section.

It is a short step from executing a script action to writing some Plug In Actions.

File Actions

File actions allow you to interact with the file system, moving, copying, duplicating, trashing or deleting files or folders. The actions are:

The source path must be an absolute path (or a home relative ~ path). The destination path must either be a simple single path component (not ~ or /) or an absolute path. If it is a simple path component, then it is relative to the parent directory of the source path. This is particularly useful in the Move or Rename action, as you can, for example, rename from ~/Folder/Old Name to New Name.

You can read or write files in a variety of formats, including PNG, TIFF, JPEG, as well as HTML, Web Archive, Word Document and more.

File attributes include:

Safari and Google Chrome Actions

You can control Safari or Google Chrome, including creating windows and tabs, moving tabs, and interacting with web pages. The actions are:

There are a number of Text Tokens to get various values from the web browser, including title, URL, ready state, a field value or the result of arbitrary JavaScript.

There are also a number of functions to get various values from the web browser, including the tab count, tab index, and whether the browser has currently finished loading.

Note that complex web sites often report that they have finished loading and then start loading again, which is why the action to wait for the browser to finish allows you to specifiy a required minimum time.

See also the Text Tokens and Calculations sections.

Image Actions

Image actions allow manipulations such as flipping or rotating images, or capturing the image of a window or screen. The actions are:

Image actions typically act on an image in the system or a Named Clipboard. You can read or write images files using the File actions.

Interface Control

Interface Control actions allow you to interact with the user interface, selecting menus, clicking buttons, simulating keystrokes and so forth. The actions are:

Manipulate Window
resize, move, center, bring to front, close, zoom, or minimize a specified window in a specified application.
Bring Application Windows to Front
brings all the windows of the current application to the front.
Move or Click Mouse
move, click or move and click the mouse using any mouse button, and optionally dragging. You can specify modifiers such as the shift key, as well as the position, relative to any corner of the front window, the main screen, or the current mouse location, or a found image on the screen.
Select or Show Menu Item
select or show a specified menu item in the front or a specified application.
Press Button
press a named button in the front window.
Simulate Keystroke
simulate pressing a specified keystroke.
Simulate Scroll Wheel
simulate scrolling the mouse wheel up or down, left or right.
Use Variable
use a variable to move the mouse, or to adjust a window or the front application, or the system volume.

The various size and location fields can be Calculations.

The Manipulate Window action includes defaults for positioning a window in various columns or corners of a screen. This is a useful way to see some examples of calculations you can use.

The Move or Click Mouse has lots of options, including single, double or triple clicking, and where the click is relative to. If you record a mouse click, you can (for a short while) adjust the corner that the click is relative to and the values will adjust accordingly. You can also perform a click and drag with this action.

The Select Menu Item action lets you choose from all currently running applications and their menus, which helps ensure you have correctly specified the menu. If you leave the menu item blank, Keyboard Maestro will show you the menu and let you then select it manually.

The Select Menu and Press Button actions allow you to specify multiple options separated by a vertical bar (eg Show|Hide) to allow for toggling menus. They will also ignore the difference between three dots (...) and an ellipsis so you do not have to worry which one the menu uses. Alternatively, you can start the name with an ^ and use a regular expression to match the menu or button name. Also, Select Menu will translate the word "APPLICATION" (all capitals) into the current application name, allowing menu selections like APPLICATION -> About APPLICATION.

The Select Menu and Press Button actions will, by default, abort the macro if the action is not successful (for example if the button or menu cannot be found or is disabled). The action can be configured to allow the macro to continue if the menu or button is not essential (such as “Mark As Read” which might be disabled if the item is already marked as read).

iTunes Control

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:

Play a Specific Track
play a specified song.
Play a Specific Playlist
play the songs in a specified Playlist.
Play a Random Track
play a random song.
Play a Random Track from a Specified Playlist
play a random song from a specified Playlist.
Play/Pause Current Track
toggle from playing to pausing or vice-versa.
Pause Current Track
pause the current song.
Stop Current Track
stop playing any song.
Fast-Forward Current Track
fast-forward the current song. It will keep fast-forwarding until you do something else or until it reaches the end of the song.
Rewind Current Track
rewind the current song. It will keep rewinding until you do something else or until it reaches the beginning of the song.
Next Track
play the next song.
Previous Track
Go to the previous song or the start of the current song if it is already playing.
Increase/Decrease or Set iTunes Volume
Increase, decrease or set the iTunes volume.
Increase/Decrease or Set Rating
Increase, decrease or set the rating of the current track.

Keyboard Maestro Actions

These actions allow you to control how Keyboard Maestro behaves. The actions are:

Record Quick Macro
record a temporary macro for immediate playback.
Trigger Macro by Name
type the name of a macro to trigger.
Set Macro or Group Enable
enable, disable or toggle a Macro or Macro Group.
Activate a Macro Group
activate a Macro Group for one action or toggle activation.
Show Macro Group
show a Macro Group as a palette for one action or toggle visibility.
Cancel Macros
cancel one, other, or all macros.
Comment
does nothing, just allows you to comment a macro.
Show, Hide or Toggle the Global Macro Palette
shows or hides the global macro palette.
Show Status Menu
Shows the Keyboard Maestro status menu.

Trigger Macro by Name allows you to trigger any active macro by name. By default, Keyboard Maestro creates a macro triggered by Command-Control-Option-T or the status menu which triggers a macro by name.

Recording 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 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 a 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 Set Macro or Group Enable action allows you to enable, disable or toggle the enable of a macro group or macro. The Keyboard Maestro editor does not need to be running, but it will see the enable state when it is next launched (or immediately if it is already running).

If you hide the global macro palette, it will remain hidden until shown. You can also hide the global macro palette by clicking the close icon, so you may wish to include a global macro, perhaps with a status bar trigger, which uses the Show Macro Palette to redisplay it.

MIDI Actions

Send a MIDI message:

Send MIDI Note On
sends a MIDI Note On message, specifying the note, velocity and channel.
Send MIDI Note Off
sends a MIDI Note Off message, specifying the note, velocity (usually 0) and channel.
Send MIDI Control Change
sends a MIDI Control Change message, specifying the control, value and channel.

The MIDI messages come from a device named “Keyboard Maestro” which will be created as soon as you add any MIDI action.

Notification Actions

Keyboard Maestro can notify you in a variety of ways:

Growl
display a message via Growl (or in a popup HUD window if Growl is not installed).
Display Text
display text (which may contain Text Tokens).
Alert
display an alert (which may contain Text Tokens).
Prompt For User Input
display a dialog requesting information, see the Prompt For User Input Action section.
System Beep
play a standard system beep.
Play Sound
play a sound, optionally through a specific output device.
Speak Text
speak text (which may contain Text Tokens) in any desired voice or speed.
Log
log a message to the Engine.log file.
Highlight Location
highlight a location on the screen.

Open Actions

Open actions allow you to open files, folders, URLs or System Preference Panes. The actions are:

Open File or Folder
opens a specified file or folder. Don’t underestimate the power of this command as you can open bookmarks or other action documents to perform a lot of customized actions.
Open the Finder Selection
opens the files or folders that are currently selected in the Finder.
Open URL
open a URL with the appropriate helper.
Open System Preference Pane
opens a specified System Preference Pane.

Files, folders, the Finder selection and URLs can all open either in their default applications, or a specific application. So you could, for example, create a macro that opens the Finder selection in BBEdit.

QuickTime Player Control

QuickTime Player Control actions allow you to interact with QuickTime Player, playing movies, stopping or pausing, stepping forward or backward, or adjusting the volume. All actions will launch QuickTime Player if it is not already running. The actions are:

Play Current Movie
play the current movie.
Play/Pause Current Movie
toggle from playing to pausing or vice-versa.
Pause Current Movie
pause the current movie.
Step Forward Current Movie
step the current movie forward one frame.
Step Backward Current Movie
step the current movie backward one frame.
Increase/Decrease or Set QuickTime Player Volume
Increase, decrease or set the QuickTime Player volume.

Switcher Actions

Keyboard Maestro includes several powerful switchers, including Application Launcher, Application Switcher, Window Switcher, and Copy, Cut and Paste Clipboard Switchers and Clipboard History Switcher.

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:

Activate Application Launcher
activates the Application Launcher (Command-Control-Tab).
Activate Application Switcher
activates the Application Switcher (Command-Tab).
Activate Clipboard Copy Switcher
copies the current selection to a named clipboard you select (Command-Shift-C).
Activate Clipboard Cut Switcher
cuts the current selection to a named clipboard you select (Command-Shift-X).
Activate Clipboard Paste Switcher
pastes a named clipboard you select into the current system clipboard and current selection (Command-Shift-V).
Activate Clipboard History Switcher
pastes a previous system clipboard you select from the clipboard history into the current system clipboard and current selection (Command-Control-Shift-V).
Activate Window Switcher
activates the Window Switcher (Control-Tab).

You can create your own macros using these actions or adjust their triggers within the Switcher Group.

By default, Keyboard Maestro overrides Command-Tab and the system application switcher. If you wish to use the default system switcher with Command-Tab, you can do so by disabling Keyboard Maestro’s macro or by changing its hot key trigger.

System Control

System Control actions allow you to control your Mac. Most are pretty self-explanatory. The actions are:

Put Computer to Sleep
puts your Mac to sleep.
Restart Computer
restarts your Mac.
Shut Down Computer
shuts down your Mac.
Fast User Switcher
Fast User Switch to a specific user designated in the macro.
Log Out
Log Out the current user.
Set Find Pasteboard
sets the global "Find" pasteboard, typically equivalent to selecting text and choosing Use Selection To Find. The Find Pasteboard is used in most applications.
Open/Close CD Tray
Opens the CD tray if it is closed, or closes it if open (especially useful for keyboards that do not have an eject key).
Toggle System Sound Mute
Mutes the sound if sound is currently on, unmutes the sound is already muted.
Increase/Decrease System Sound Volume
Increases or decreases the sound volume.
Set System Sound Volume
Sets the sound volume to a specific amount (can be a calculation).
Increase/Decrease Screen Brightness
Increases or decreases the screen brightness.
Start or Stop Screen Saver
Starts or stops the system screen saver.
Sleep or Wake Screen
sleeps or wakes the monitor.
Set Network Location
sets the network location.

Some of these actions require particular hardware support and so may not work on all Macs.

Text Actions

Most of these actions are covered in their respective sections (eg Set Clipboard to Text is covered in the Clipboard Actions section).

The Insert Text action deserves special attention as it allows you to insert specified text by

For inserting text by typing, the text may include non-ASCII characters as long as they can be typed on the keyboard with one or two keystrokes.

The Display Text action allows you to display the resulting text in a floating window or Notification Center.

Tokens are provided to include variables, calculations, the time or date, and a large variety of other system information.

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 “Thanks for your support, 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 you can use an Insert Text action to insert the copyright message at the top of code files:

/*
 *  Created by %UserName% on %ICUDateTime%EEE d MMM yyyy%.
 *  Copyright (c) %ICUDateTime%yyyy% Stairways Software. All rights reserved.
 */

There are three ways to type text in Keyboard Maestro: Insert Text by Typing, Insert Text by Pasting, and Type Keystroke. A common question is when should you use each?

The Type Keystroke action lets you type a single keystroke, pretty much any kind of keystroke you can type on the keyboard.

The Insert Text by Typing action converts plain (simple) text into keystrokes and then types each of them individually. It only works with characters that can be typed on the keyboard with one or two keystrokes (eg Option-e e usually types é, and Keyboard Maestro can duplicate that typing).

The Insert Text by Pasting action sets the clipboard to the (optionally styled) text and then types a Command-V keystroke.

Each action has its advantages and disadvantages:

The Type Keystroke action is just like typing yourself, so you can type any keystroke and any number of them, but it can be tedious to create a sequence of keystrokes in a macro.

The Insert Text by Typing action is also just like typing yourself, similarly permitting characters like tab/return and maintaining the current style in the program into which you are typing, but it is slow for large amounts of text and can't type exotic characters like Emoji.

The Insert Text by Pasting action is fast for large text and can include any kind of characters, as well as styles like bold and italic, but it overwrites your clipboard and its handling of styles may occasionally not conform to your expectation.

So you should use Type Keystroke when:

Use Insert Text by Typing whenever:

Use Insert Text by Pasting when:

See also the Text Tokens section.

Variable Actions

Keyboard Maestro includes permanently stored variables that you can use in a number of special purpose actions, as well as in Calculations or Text Tokens which can be used in almost any field in Keyboard Maestro. These specific actions let you manipulate variables:

Set Variable to Text
set a variable to text. Text Tokens are provided to include such things as the value of other variables or the time or date.
Set Variable to Calculation
set a variable to the result of a calculation with numeric formatting, see the Calculations section.
Set Variable to Keychain Password
set a variable to a password value from the Keychain.
Set Keychain Password to Text or Variable
the reverse, sets a password in the keychain to a value.
Filter Variable
apply one of a set of filters to a variable, see the Filters section.
Search and Replace Variable
search and replace the value of a variable, optionally using regular expressions, and allowing Text Tokens. The replacement can also include $1 tokens for regular expression replacements.
Search Variable
search a variable using regular expressions, and capturing the results.
Substring of Variable
extract a substring of a variable.
Use Variable
Use a variable to set a variety of system values like mouse location or front window. See below.
Prompt For User Input
display a dialog asking for a variety of user input, see the Prompt For User Input Action section.

The Use Variable action can perform the following actions:

Most of these have analogs in the Text Tokens, so for example you might do:

Set variable ‘Temp’ To Text ‘%FrontWindowFrame%’
Set variable ‘Temp’ To Calculation ‘Temp[1]+Temp[3]/4,Temp[2]+Temp[4]/4’
Use ‘Temp’ to Set the Mouse Location

Which will result in the mouse being placed in the middle of the upper left corner of the front window.

Search Variable will use a regular expression to pull apart a variable, allowing you to extract the various parts. It displays the results live in the editor, allowing you to construct complex regular expressions more easily.

See also the Variables, Text Tokens and Calculations sections.

Prompt For User Input Action

Prompt For User Input will allow you to ask for user input, storing any results in variables as designed. If the variable is a password variable (ie, its name starts or ends with “Password” or “PW”), it will be displayed in a password field.

If the default value you specify consists of choices separated by a bar (|), then a popup menu will be used (the first value will be the default value, and can be repeated later if a different location is desired). For example “Better|Good|Better|Best” would result in a popup menu with Good, Better, and Best, with Better pre-selected.

If a component of a popup menu item is a dash (-), then a separator is displayed. For example, “Good|Better|Best|-|Terrible”

If a component of a popup menu item starts with a prefix followed by two underscores, then the prefix will be used as the variable value, while the latter part will be displayed in the menu. For example, “B__Good|F__Fail|C__OK|B__Good|A__Excellent”.

If the field starts with a bar (|), then token expansion happens first, followed by separating by bar (|) - this allows you to have a variable list of entries, for example, “|This|%Variable%Multiple Entries%”. Otherwise, the entry is separated by bar first, and then token expansion is applied to each field, so that fields may contain bars, for example, “This|That|%Variable%One Entry%”.

If the popup menu would contain only "0" and "1", then a checkbox is used (so for example, “0|1" or "1|0", depending on the desired default).

If the variable name starts with a prefix followed by two underscores, then the label will show only the latter part of the variable name (for example, MyMacro__Text Message will display a label of Text Message).

You can include one or more buttons, which may optionally cancel the macro. You can also include /«letter» to configure command keys for the buttons (/. means escape, / by itself means the default button) (for example, “Help/H”. If there are no text fields in the dialog, the command key is not needed and the letter by itself will complete the dialog. The name of the button pressed will be stored in the Result Button variable.

Prompt Action
Prompt Window

See also the Variables section.

Web Actions

You can open a URL in your default browser or a specified alternative and you can have Keyboard Maestro query you for a search term and then search a specified web site (by default Google).

Continue on to Macro Syncing

Close

Feedback Form

Please provide any feedback you may have


Email Address:
Subject:
Feedback:


Your email address is appreciated but is not required and will not be saved.
It will be used only for responding to or clarifying this feedback.

Documentation

Old Documentation