Keyboard Express macros may be assigned to play back in a specific window or run on a global basis. When assigned to a specific window, the macro will only run if that window is active. If the window is closed, then the macro will not play at all. A global macro will always play back in any window.
The selection to choose between a specific window macro and a global macro is located on the Keyboard Express - Editor. Global is the default selection. For a specific window macro, select "Specific Window" and then click on the "Choose Window" button. The "Choose Window" button will prompt for a window title (the title in the caption bar of a window). This window title does not have to be an exact match. A partial match will do.
Since specific windows may be assigned to a hotkey, it is possible to assign the same hotkey to multiple windows. But only one Global Macro may be assigned to any given hotkey. Below is the window that displays when assigning a macro to a specific window.
Keyboard Express - Editor > Specific Window > Choose Window button
Window Title
Select the window title desired. If the window is currently running, scroll through the list and click on the title. The window selected is placed in the Window Title edit field. If the window is not currently running, type the window name in the Window Title edit field.
Exact Match/Partial Match
The exact match option requires that the Window title match exactly before the macro plays back. A partial match only requires a portion of the window title in order to work. For example, "notep" would be sufficient to find the "notepad" window. Choose which option from the drop down list.
The title contains wildcards
Select this option if a wildcard is included in the window title name. A wildcard uses the " * " or " ? " characters in the title to expand the possibilities of a match. These are similar to the wildcards used in Windows for searches.
A Window with this Title Must Be on Top
This option only runs the macro if the window is the current top-most window (the one that is showing on top of all other windows).
Note: If this option is not selected, the macro will start if the window is running in the background and play back in whatever window has focus.
Pause when focus is changed
With this option selected the macro will pause if another window takes focus. The macro will resume once focus is returned to the window specified in the macro.
After making a selection, click OK and the macro is assigned to only activate with the window selected.
Example
"Address 1" is assigned to CTRL+A as a Specific Window macro. The window title is "Word".
"Address 2" is also assigned to CTRL+A as a Specific Window macro. The window title is "Outlook".
"Address 3" is assigned to CTRL+A as a global macro.
What happens when CTRL+A is pressed in the following situations?
1.In scenario #1, Word is running, but not Outlook. The "Address 1" macro runs because Word is running.
2.In scenario #2, Outlook is running, but not Word. The "Address 2" macro runs because Outlook is running.
3.In scenario #3, neither Word or Outlook are running. The global macro will play back "Address 3" into the current active window.
4.In scenario #4, both Word and Outlook are running. This scenario depends on a couple of factors. First, if the top most or active window is Word, then "Address 1" will play back into Word. If the top most or active window is Outlook, then "Address 2" will play back into Outlook. If neither program is the top most or active window, then control will turn to Word and "Address 1" will play back. Why? Because "Address 1" with the Specific Window of "Word" was entered first into Keyboard Express.
Additional notes about Scope: As an example, consider a hotkey macro of F12 with the scope set to window specific - to only start in a Notepad window. When running Wordpad and pressing F12 the macro does not play. But the macro does run when Notepad is open and F12 is pressed. Now, this F12 macro may insert text into Notepad and then later open Wordpad during the same macro. The macro scope does not prevent this. The scope only refers to the window that is open when the macro starts.