Capture Control

 

The Capture Control command saves the Window Control information to a variable. The control information is captured during playback of the macro. Use the Get Control command to obtain the control information during the creation of the macro. 

 

 

Script Editor > Expand Window Controls Category > Capture Control

 

 

How to Capture the Control

Select to capture the control that currently has focus, is underneath the mouse cursor or at a specific location on the screen.

 

Beneath Mouse

During playback of the macro, this command determines the location of the mouse cursor. The control located beneath the mouse cursor is captured and saved to the variable in the "Save to" field.

 

Focused Control

During playback of the macro, this command determines which control has focus. The control information is captured and saved to the variable you specify.

 

Specific Coordinates

During playback of the macro, the mouse moves to the X and Y coordinates of the screen. The X coordinate represents the number of pixels from the left edge of the screen. The Y coordinate represents the number of  pixels the mouse is positioned from the top of the screen.

 

If necessary, click on the Launch the Mouse Locator button to find the screen coordinates. The control that exists beneath these coordinates is captured. This control information is saved to the variable.

 

 

Save To

Save the control to a variable. Select the control variable to store the information.

 

 

Capture 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.

 

 

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 depends on how the program was written.