Variable Modify Control
Script Editor > Expand Variables Category > Variable Modify Control
Copy a Control Variable
This option simply copies the information saved to one control variable to another. This may be useful if needing to retain the value of the original variable, but at the same time manipulate the value. Use this command to make a copy of the variable and now do both.
Control Variable to Receive Result
Select the variable to receive the information from the control variable being copied.
Control Variable to Copy From
Select the control variable that contains the information to copy to another variable.
Copy the Control from the Activation
This command can be used only if the macro is a Control Activated macro. For example, later in the macro script it may be necessary to modify the control that activated the macro. Rather than use the Get Control function and capture the control again, save the activation control to a variable.
Control Variable to Receive Result
Select the variable to receive the information from the control activated macro.
Modify the Top-Level Window Title
When the Get Control or Capture Control commands are used, Macro Express saves a description of the Window Controls in the control variable. This information is used to identify the control. The information includes the name of the program and the name of the top-level window that contains the control.
üNote: This command modifies the content of a control variable. It does not modify the control itself.
Many programs, including but not limited to Internet Explorer, change the title of the top level window depending on what is happening within the program. By using the ‘Modify the Top-Level Window Title’ command, the Control Variable may be changed so that the Get Control or Capture Control commands are not needed again.
The window title can be either a partial or an exact match. For example, if using a control in Internet Explorer, use "Internet Explorer" as the window title, despite what the window title shows, and specify a partial match.
Use the Partial Title option of the ‘Modify Top-Level Window Title of Control Variable’ command to modify the window title (stored in the Control variable) to work with either Edit or View modes. In the example above, the title could be set to ‘Sample #5’. To make this even more flexible, change it to ‘Sample #’ so that it works in Edit and/or View modes and with all items in the database.
Consider a program that has ‘Edit’ and ‘View’ modes. When in Edit mode the title bar displays ‘Edit Sample #5’. When in View mode the title bar shows ‘View Sample #5’. In this example, there is an OK button on the form.
If Edit mode is open when the macro is created to access the OK button on the form, the macro will not work when in View mode … even though it is the same control. There are two choices. Use two Get Control commands to capture the control in both Edit and View modes. Or, use one Get Control command and use the ‘Modify the Top-Level Window Title" command to change the Window title.
When using controls, the top-level window is the main window that contains the control. This command allows the user to adjust what window title the control looks for. For example, Internet Explorer changes its window title often. This option allows the user to define one control variable and use it to work with different windows in order to perform actions with the desired control.