Frequently Asked Questions

 

Please visit our Macro Express Knowledge Base for additional topics.

 

 

Why are so many of the icons and menu items grayed out in the Explorer window?

Most likely focus is on the System Macros category, with all of the system macros displayed. Select any other macro category and the icons/menu items will be accessible.

 

 

How do I place a macro in an endless loop?

The best way to place a macro in an endless loop is to use the Repeat Until Command. Basically, assign a value to a variable such as N[1] = 0. Use the Repeat Until condition to test the variable against a different value such as Repeat Until N[1] = 1. As long as variable N[1] never is changed to 1 during the macro playback, the macro repeats indefinitely. Below is a brief example of what the code would look like in the Script Editor:

 

  Set Integer Variable N[1] to 0

  Repeat Until N[1] = 1

  .... (your macro code here)

  Repeat End

 

 

Note: Please do not have one macro call another macro (via the "Macro Run" command) and in turn have the second macro call the first macro. Putting two macros in an endless loop in this fashion will eventually end up in a system crash. The system resources used by Macro Express for each macro never get freed in this instance because the macro never actually finishes executing before calling the other macro.

 

 

How do I stop a running macro?

There are several ways to do this. If the Running Man icon is displayed in the notification area when a macro runs, right mouse click on the icon to stop the macro. Or press the default keys of Scroll Lock and Pause keys to stop the macro. Click on Options > Preferences > Playback - Miscellaneous Tab to change the default to Win + ` or the Pause key.

 

Any of these options will cancel a macro that is playing. Please note that macros that consist of many keystrokes may send the keystrokes rather quickly and Windows will buffer up the keystrokes. Once such commands have been buffered up in Windows, aborting a macro does not cancel them. In this cases, it may appear that the abort command did not work when in reality the macro has already finished issuing its commands and Windows is now processing them.

 

 

How do I click on a button on a web page?

Once the cursor is positioned over a button (via the tab key), press the Space bar. Use the Text Type command to issue a Space bar press or insert using the Direct Editor.

 

For example, when inserting name, street address, city, state and zip code followed by a submit button on a web page, the macro may look as follows: "Fred Smith<TAB>123 Apple Lane<TAB>Small Town<TAB>UT<TAB>80000<TAB><SPACE>". When invoked, this macro tabs through the fields, inserting the data and then presses the Space bar to trigger the Submit button. The Space bar key works equally well with checkbox and radio type buttons on web page forms.

 

 

How do I ensure the CTRL, ALT or SHIFT keys are held down in a macro?

There are two methods that may be employed. They are listed below.

 

1. The first method is to use the CTRL, ALT and SHIFT Keys that can be accessed in the Text Type command or through the Direct Editor. By default, anything that follows <CTRL>, <ALT> or <SHIFT> is acted upon as if it were being held down.

 

For example, if the macro contains <CTRL>a, then this is the same as holding down the CTRL key and pressing the "a" key. If the macro contained <CTRL><ALT>a, then this would be the same as holding down the CTRL key and the ALT key at the same time and then pressing the "a" key. The same applies to the SHIFT key.

 

 

Two notes about these keys:

 

A.  Use a lower case letter with these keys, such as <CTRL>a. Macro Express interprets <CTRL>A as <CTRL><SHIFT>a, which renders a different result.  

 

B.  There are certain system keystroke commands that are built into the operating system at a low level such as CTRL+ALT+DELETE. These keystroke sequences in macros are not recognized by Windows at this low level and will not work as intended.

 

 

2. The second method uses the specific functions for "Alt Key Down", "Alt Key Up", "Ctrl Key Down", etc. These are found in the Text Type command. Choose "Alt Key Down" followed by the letters to be associated with the ALT key. Then follow with an "Alt Key Up" command. Again, be sure to use lower case letters. An example would look like <ALTD>fo<ALTU>.

 

Make sure to include the corresponding Up key or the key will remain held down and cause unpredictable results. The "WIN" key is also available for down and up usage.

 

 

How do I dynamically change the contents of a macro?

There are a couple of ways to accomplish this.

 

1. One method is the "Text Insertion" option. The macro can load in a text file at any point during playback and execute the text of the file as part of the macro. The dynamic portion of the macro is stored in the text file. Change the contents of the text file to alter the playback of the macro..

 

2. A second method is to include "Variables" in the macro script. Populate the variable in any number of ways including being prompted, loading from a text file, loading from the clipboard and many others.

 

 

How do I get Macro Express to not display when I first start the program? I just want the icon in the notification area.

From the Macro Explorer, click on Options > Preferences > Startup. Make sure the Show the Editor option is not checked.

 

If the Macro Express icon does not display in the notification area, click on Options > Preferences > General - Notification Area tab and select the Display Icon in Notification Area option.

 

 

How can I not have any delays between keystrokes when capturing a macro?

Before capturing a macro click on Options > Preferences > General - Capture tab. Remove the check next to the "Capture at a Specific Speed" option. This captures the macro without any delays or hesitations. Be careful with this option as it may cause the macro to play back too fast and throw off the timing of the macro. 

 

 

Can I use macros in DOS programs?

Macro Express currently only works with Windows programs. It does not paste keystrokes into a DOS program. The global Windows "keyboard hooks" that we tap into are not relayed to DOS programs even if they are running under Windows.

 

 

Can I auto repeat keystrokes?

This question references the "Why can't I hold down the CTRL key and continue to press and release the "a" key for multiple CTRL+A macros to be played?". The real answer deals with the "global" nature of our program -- that is our macros will work in any program at any time. For this to occur, we actually send the keystrokes through the Windows internal keystroke processing system just as if the key were pressed from the keyboard. Because of this, all keys must be released before the macro plays back. This is to ensure that no adverse keyboard effects will affect the playback of the macro.

 

Let's take an example. Suppose a company name of "My Company, Inc." is assigned to the hot key "Alt-A". Hold down the ALT key and press the "A" key to activate the macro. If the macro were to start playing immediately upon doing this, the ALT key would still be held down and the macro would play back as ALT-M, ALT-y, etc until the ALT key is released. To prevent this from occurring, we require all keys to be released before the macro will start.

 

 

My macros do not play back.

There are a couple of possibilities here.

 

1. The simplest and sometimes overlooked by new users is that the Macro Express Player needs to be running for the macros to work.

 

2. It is possible that another program loaded after Macro Express installs itself improperly into the Windows Keyboard Hooks. When this happens, our program never sees the keystrokes and therefore does not work. (The last program run gets first look at the keystrokes). Your recourse here is to try one of the following:

A. Unload the program that is causing the problem

B. Make sure that Macro Express is run after starting the offending program

C. Use the Tools > Restore Keyboard & Mouse Hooks menu option.

D. Choose Options > Preferences > Activation -  General Tab and select Auto Restore Keyboard and Mouse Hooks.

 

In the latter three cases both Macro Express and the offending program will work as Macro Express properly handles the situation. Ultimately, the vendor of the offending program needs to fix the problem.

 

3. Make sure that the Macro Scope is set correctly.

 

 

My macro does not seem to invoke menu commands.

Some programs appear to interpret ALT keystroke sequences as something other than menu commands. This exhibits itself when certain menu commands work from Macro Express and others do not. There are two methods for working around this problem.

 

1. Use the ALT Key Down and ALT Key Up keystrokes in the Text Type command or Direct Editor. This option holds down the ALT key while the letter is pressed and then the releases the key. The syntax would look like the following if attempting to execute an ALT f - <ALTD>f<ALTU>.

 

2. The other option is to use a double ALT (<ALT><ALT>). Two ALTs in a row is the equivalent of pressing the ALT Key and releasing it. Doing so activates the menu and the next letter activates the appropriate menu option. The syntax would look like the following if attempting to execute an ALT f - <ALT><ALT>f.

 

 

My macro seems to go bonkers or play out of sequence.

The problem is a timing issue. It is sometimes possible for the keystrokes themselves to be sent too quickly for the desired actions. The program or window may not be ready to accept the keystrokes from the macro. There are several ways to work around this problem.

 

1. Use one of the Wait commands to instruct the macro to wait until ready to proceed.

2. Insert a Delay at the necessary spot in the script.

3. Use the Keystroke or Macro Speed command to slow down the keystrokes in the macro.

4. Apply a system wide delay to all keystrokes played back via macros.