Variable Set Control Text

 

The Variable Set Control Text command changes the text in the control variable in order to look for the control using different text. For example, if the "Get Control" command was used to capture an edit box, Macro Express will not be able to find the edit box on playback if the text changes.

 

Below is an example of how this works. Capture an edit box containing the word "Testing". Subsequently the word "Testing" is changed to the word "Macro". In this case the macro would not find the edit box. But, knowing that the edit box could contain the word "Macro" then the Variable Set Control Text command will help. Set the New Text to "Macro" and the edit box would be found if it contained the word "Macro".

 

 

Script Editor > Expand Variables Category > Variable Set Control Text

 

 

Control Variable to have Text Modified

Select the control that is to be modified.

 

 

New Text

Insert the text that will modify the control variable.

 

 

üNote 1: This command affects the Control Variable only. It does not affect the control in the application.

 

üNote 2: Macro Express uses two different methods to identify a control.

Method one identifies the Class name of the control and the Text contained in the control. For example an OK button may have a class name of Button and the text of OK.

Method two identifies the Class name and what is called the Z index. Basically the Z index is the order that the control appears on the form. For example you may have two buttons, "OK" and "Cancel". Macro Express will identify the OK button as class name Button and Z index of 12, but will identify the Cancel button as class name Button and Z index 13.

The second method is the only one that can be used with the Variable Set Control Text command. Select which method to use when capturing a control. Leave the Capture Using Text option unchecked to capture using this second method.