Macro Express News

February 24, 2015

This is the online edition of the Macro Express News email newsletter. You can have future editions delivered directly to your email inbox. Visit the Macro Express News page to subscribe or to view past issues.

Macro Express Pro v 4.6.1.1

Macro Express Pro v 4.6.1.1 is now available from www.macros.com/download. This release of Macro Express Pro contains many enhancements and bug fixes including:

  • Made changes to the samples.mex sample macros file to make it easier to disable the Menu of Sample Macros.
  • The size of the If Message dialog is now adjusted to allow for a longer Caption or User Defined button captions.
  • Added preferences to change what is displayed in the Mouse Locator including whether to use the translucent style.
  • The Mouse Locator can now be launched from the Script Editor.
  • Updated ‘If OS Version’ and ‘Get OS Version String’ commands to support Windows 10.
  • Can edit properties of System Macros by right-clicking and then choosing Macro Properties or by double-clicking on a system macro.
  • Errors in the Load Macro Text File command should no longer crash and can now be handled by the On Error handling.
  • Errors in the Run Macro in Variable command should no longer crash and can now be handled by the On Error handling.
  • Fixed the cause of a crash that could occur when a Menu pops up and a selection is immediately made.

A complete list of changes is available on the Revision History page.

Macro Express and Macro Express Pro Keyboard Shortcuts

Recently a customer requested “In the Script Editor consider providing a keyboard shortcut to move to the Search for Command field.” We were happy to explain that Macro Express Pro already has a keyboard shortcut for this.

To move to the Command Search type Alt + Down Arrow. Similarly, to move to the List of Commands type Alt + Left Arrow and to move back to the macro edit box type Alt + Right Arrow. These shortcuts are very helpful when creating or editing macros.

View a list of keyboard shortcuts in Macro Express and Macro Express Pro here or in this knowledge base article. The HotKeys for Pause Macro and Abort Macro can be changed via the preferences. HotKeys for the System Macros can be changed via the Macro Properties.

Tip: Press and release the Alt key to display underlines for shortcut characters in menus

Many programs support special accelerator keys or shortcuts to perform actions. You are probably aware of these that you type every day. For example, <Alt> + F + O * opens a file in Notepad and Word. Using these shortcuts in your macros is more reliable than using mouse movements and clicks. The reason for this is that components often are in different locations depending on the size of an application’s window and its location on the screen. To determine which shortcut keys are available look for underlined characters in menus and on buttons and use those shortcuts in your macros.

When creating a Multiple Choice menu placing an ampersand (&) in front of a character will cause that character to be underlined and, like menus in other programs, will allow you to type <Alt> and the character to choose that menu item. Similarly, depending on the style chosen, popup and floating menu macros will display underlined characters allowing quick access to those options.

“But wait!” you might say, “I don’t see any underlined characters.” This is because, by default, Windows hides the shortcut characters. To display them press and release the <Alt> key.

You can adjust Windows to always display underlined shortcut keys if you do a search for Easy Access Key in Windows and click on “Turn on Easy Access Keys”.

* Note: While accelerator keys or shortcuts are usually documented using uppercase letters (<Alt> + F + O), when using shortcuts in macros, you should use lowercase letters (<Alt>fo). When a macro text types uppercase letters it actually sends something like this: <Alt><Shift Down>fo<Shift Up>. The extra <Shift Down> and <Shift Up> can cause many programs to not correctly recognize the shortcut key sequence.

Tip: Text Box Display to Show Macro Progress

A user asked “How can we show progress while a long running macro is working?” The answer is to use the Text Box Display command.

The Text Box Display command pops up a box on the screen with text you specify. Macro Express Pro allows you to select the font, size and color of the text displayed. The Update Text Box command allows you to change the content of the text box while a macro is running. The “Show Macro Progress” macro in Macro Express Pro’s samples.mex collection of sample macros demonstrates how this works.

In Macro Express 3 you can also use the Text Box Display command to indicate a macro’s progress. Macro Express 3 does not, however, have the Update Text Box command. To display progress your macro will need to close a text box and open a new one with updated text. Care must be taken to ensure that this does not affect how the macro interacts with the application being automated.

Capture Macro tips

One of the easiest ways to create a macro is to record or capture your actions. We frequently are asked questions about capturing a macro. Here are a few basic tips to consider.

Review the default settings used when Capturing. For Macro Express 3 click Options, Preferences, Capture. For Macro Express Pro click Options, Preferences, General and click on the Capture tab.

  1. Unless you need to capture dragging an item with the mouse or using the mouse to draw, turn on the Only Capture Mouse Clicks option. This significantly shortens the length of the macro in the Script Editor and makes the script more manageable in case you need to edit.
  2. In most cases it is advisable to use the Capture Mouse Relative to Window option. The mouse coordinates will be based on the window itself, so that the window can be anywhere on the screen and the macro will recognize the correct position.
  3. The Capture Window Size option ensures that the window is sized correctly when the macro runs so that the mouse moves and clicks on the correct items in the window.
  4. If the window is set to full screen or you are recording on the desktop, then using the Capture Mouse Relative to Screen option should work.

Keep these tips in mind while you are capturing a macro:

  1. For improved accuracy in the macro playback, use keystrokes whenever possible to open menus, highlight text, select buttons, etc., rather than relying on the mouse.
  2. Do not use <Alt> + <Tab> to move between windows. This will not record accurately. Instead click on each window as needed or edit the macro after recording. Insert the Window Activate command in the appropriate location in the script. Add a Wait for Window Title after to allow for proper timing.

For more hints about capturing a macro we suggest you read the Capture a Macro topics in the help.