Tutorial - Macro Scopes

 

 

Macro Scope

The macro scope indicates under what conditions a macro should play back. Four categories are available. They are Global, Global Except, Window Specific and Program Specific.

 

A.Global macros play back in all Windows programs.

B.Global Except macros run in all Windows programs or windows except the application or window specified.

C.Window Specific macros run only a window that has a matching Window Title as specified by the macro.

D.Program Specific macros only play back in a selected program.

 

Let's look at some real examples of how this all works. To illustrate the process, let's run two different programs for testing the macro and scope. Run Windows Notepad and Windows WordPad.

 

 

Global Macro

We have actually already created a couple of Global macros. If you have not created these macros, please refer to the Hot Key section for instructions on creating the CTRL+SHIFT+T macro. A global macro plays back in all Windows programs.

 

To illustrate, bring Notepad to the foreground (click on it in the taskbar). Now press CTRL+SHIFT+T to see the address typed into the program. Now bring WordPad to the foreground (click on it in the taskbar). Press CTRL+SHIFT+T to see the address typed into WordPad.

 

 

Program Specific Macro

We will first change the CTRL+SHIFT+T macro to become a Program Specific macro.

 

1.Minimize Notepad and WordPad.

2.With Macro Express Pro - Explorer the active window, highlight the CTRL+SHIFT+T macro (nickname of "My Address") from the Macro Explorer and click on the Edit Macro button to open the Script Editor.

3.Click on the Scope tab from the Script Editor.

4.From the Current Scope drop down menu, select Window/Program Specific.

5.Click on the Add Program button to open the Select a Program window.

 

üNote: The Select a Program window has two tabs, Start Menu and Running Processes. The Start Menu tab allows you to look through programs in your Start Menu to locate the .exe file. Or you can click on the Browse button to find the file anywhere on your computer.

 

6.For our example, click on the Running Processes tab to list all programs currently running on the computer.

7.Make sure that the box next to "This program must have a window on top" is checked.

8.Scroll through the list of programs running and find notepad.exe.

9.Highlight it in the list and click on the OK button. 

10.To see what effect the changes have on the macro and bring Notepad to the foreground (click on it in the taskbar). Press CTRL+SHIFT+T to see the address typed into the program.

11.Now bring WordPad to the foreground (click on it in the taskbar). Press CTRL+SHIFT+T. Nothing happens because the macro is set to only work in Notepad.

 

 

Global Except

The next step is to change the CTRL+SHIFT+T macro to become a Global Except macro.

 

1.First minimize Notepad and WordPad.

2.With Macro Express Pro - Explorer the active window, highlight the CTRL+SHIFT+T (nickname of "my address") macro from the Macro Explorer and click on the Edit Macro button to open the Script Editor.

3.Click on the Scope tab.

4.From the Current Scope drop down menu, select Global Except.

 

We can now choose to have the macro work everywhere except a specific window or program that we select. For this tutorial we will use the program option.

 

5.Notepad.exe should be displayed as the program that will not allow the macro to work.
a.  If not, highlight any entries and click on the Remove button to delete them.
b.  With no programs or windows selected click on the Add Programs button.
c.  From the Select a Program window click on the Running Processes tab to list all programs currently running on the computer.
d.  Make sure that the box next to "This program must have a window on top" is checked.
e.  Scroll through the list of programs running and find notepad.exe. Highlight it in the list and click on the OK button. 

6.To see what effect the changes have on the macro, bring Notepad to the foreground (click on it in the taskbar) and press CTRL+SHIFT+T. Nothing happens because the macro is defined to not work with Notepad.

7.Now bring Wordpad to the foreground (click on it in the taskbar). Press CTRL+SHIFT+T to see the address typed into the program.

8.Activate another program that accepts text input such as an email program and press CTRL+SHIFT+T. The address types into the program.

 

 

Window Specific Macro

The last step is to change the CTRL+SHIFT+T macro to become a Window Specific macro. The macro only plays if a window with a specific title is open or on top. (A Window Title is the text that appears in the top caption bar of most windows).

 

1.First minimize WordPad and Notepad.

2.With Macro Express Pro - Explorer the active window, highlight the CTRL+SHIFT+T macro from the Macro Explorer and click on the Edit Macro button to open the Script Editor.

3.Click on the Scope tab from the Script Editor.

4.From the Current Scope drop down menu, select Windows/Program Specific.

5.Highlight Notepad.exe listed in the edit field.

6.Click on the Remove button to delete this entry.

7.Click on the Add Window button to open the Select Window dialog.

 

üNote: The Select Window dialog contains two tabs, Visible and Hidden. You may select a window that is visible or a hidden program window that is never displayed. For this tutorial we will use a Visible window.

 

8.Highlight Untitled - Notepad.

9.Check the box next to "A window with this title must be on top".

10.Click OK to save.

11.To see what effect these changes have on the macro, bring Notepad to the front of the screen (click on it in the taskbar). Press CTRL+SHIFT+T to see the address typed into the program.

12.Now bring WordPad to the front of the screen (click on it in the taskbar). Press CTRL+SHIFT+T. Nothing happens because CTRL+SHIFT+T is set to only work in an Untitled - Notepad window.