Control Event
For our purposes, Control refers to the identifiable parts of a specific application window. Controls may include such things as a button, an edit box, a toolbar, a window title bar or others. The control may be part of the main application window or be part of a child window (a window within a window).
Macro Express Explorer > Macro > Add Macro - Or click on New Macro Icon
With Control Activation selected, the macro plays back when the control gains focus or the window with the control gains focus. In the example above the control name is listed. The program .exe is displayed followed by the window component that must be active in order for the macro to play back.
Launch Utility
The first step is to select the control that will activate the macro. Below is an image of the Capture Window Control window that appears when launching the control utility.
To select a Window Control place the mouse cursor on the crosshair image, hold down the left mouse button and drag the mouse over the control. When dragging the crosshairs over title bars, buttons, edit boxes, forms, toolbars, etc., the outline of the controls are highlighted. Once the control needed is highlighted, release the left mouse button. Click on the Save button to return to the Create New Macro window. The control details are saved in the edit box.
Save the control using the z-order of the control
This method saves the control information based on the order in which the controls are created or manipulated by the parent program. In some applications, the z-order may change without notice or the user being able to determine that it has changed.
Save the control using the contents of the control
This option makes the capture of a control more exact by also capturing the text found in the control. So for example, assume capturing an edit box with the word Test in it. During playback the macro looks for the edit box and verifies that it contains the word Test. If the edit box text is changed to something else, such as Reset or left blank, then the control that was captured, such as C[1], will not match the actual control in the window - edit box.
Save the control using its coordinates
There are some controls that change information each time the window with the control is opened or the program with the control is restarted as mentioned above. This renders the information saved to the control obsolete and the control will not be found the next time the macro is run. This Coordinates option saves the control information based on the location of the control in the window.
Relative to the bottom-right
Typically the coordinates of the control are measured from the top, left corner of the window that contains the control. Use this alternative method to obtain the position of the control from the bottom, right corner of the window.
Restore parent window size
This option restores the size of the parent window (the window that contains the control) to the size of the window when the original capture of the control was made.
üNote: Not every button, menu item or component on a program is actually a Control. Sometimes the only control in a given program is the window or dialog that pops up when the program starts. We have also noticed that many of Microsoft's programs seem to have fewer controls than programs from other manufacturers. How the controls work will depend upon the way the program in use is designed.
Hide Macro Express
Hide Macro Express does what it implies. The program hides or gets out of the way after pressing the Launch Get Control Utility. This makes it easier to locate the application containing the control to capture.
Launch the Macro When
After selecting the control, decide when to activate the macro. Choose either when the control gains focus or when the window that contains the control gains focus.
The Control Gains Focus
This option requires that the control be part of the active window and the control gain focus. For example the mouse cursor could be in an edit box, giving focus to this control. Or a button may be highlighted and have control.
The Control's Window Gains Focus
With this option the macro starts when the window containing the selected control gains focus.
Control Details
This edit box lists the details of the selected control using the Launch Utility. The information should match what was listed in the Capture Window Control window.
Macro Nickname
Optionally assign a name to the macro to later help more readily determine what the macro does.
Build as a Popup Menu
Select this option and click on the OK button to open the Menu Builder and create a popup menu.