You can record macros to automate the following types of actions:
You cannot record:
Recording a macro is an easy way to get started on a more complex macro. After you save a recorded macro, you can edit it in the Visual Basic editor to add functionality and make it easier to maintain.
If you are working with an unstructured display format (such as Open Systems terminals), you'll probably find it useful to record a macro and then look at the recorded code to get information such as the strings returned by a host or the screen positions of selected data.
This example shows how to record a macro that copies data to the clipboard. It also shows how to modify the recorded code to disconnect the session after the data is copied.
To run the macro from the editor, place the cursor in the code window and press F5.
When you record a macro, the macro recorder creates variables for two important objects (the names of the objects are unique to the terminal type):
The macro uses the ThisFrame property to get the control for the session that is selected (displayed in the workspace) during the recording. ThisFrame is a property that is available in any Reflection macro. It returns the top-level user interface component for the workspace and can be used to access the controls (sessions) running in the workspace.
For more about these objects, see Using the Reflection Object Model.