Information Center

Using the Macro Editor

The Macro Editor allows you to modify an existing macro or create new macros.

Overview
Tab descriptions
Saving a macro
Cancelling a macro
Code Editor: Editing the XML script
Importing a macro
Exporting a macro

Overview

Z and I Emulator for Web records macros using XML scripting. You do not need to know XML scripting to edit a macro using the Macro Editor. Instead, the Macro Editor creates and modifies the script for you based on your input.

Users can edit any macro. If the user does not have write-access to the location where the macros is, they can save the updated macro to an alternate location.

After recording a macro, not only can you make changes to host screen definitions but you can use the Macro Editor to further customize and fine-tune it. For example, you might decide that the descriptors used to identify a screen when the macro was recorded were too general for your environment (too many other screens fit the same descriptors). You can add new descriptors or modify the existing ones. When recording with the Macro Manager, the macro is recorded in a single, sequential format. Using the macro editor, you can expand the macro to add looping for repeating screens and conditional logic to handle multiple screen paths in a host application.

When you record and play a macro, it is not a fixed sequence of screens and actions. Rather, for each screen that is displayed, the macro program searches defined screens until it recognizes the screen. It identifies the screen based on the descriptors defined for each screen (by default, the Macro Manager uses the number of fields and input fields on the screen). Once a screen is identified, it performs the actions defined for that screen. It then repeats these steps for each new screen it recognizes.

Tab descriptions

The Macro Editor separates a macro into four elements. Each tab represents an element:

Macro
Contains general information about the macro.
Screens
Contains all the screens defined in the macro and all descriptors and actions that are defined inside each screen.
Links
Defines the ordering of the screens.
Variables
Defines the macro variables.

Saving a macro

Use the Save and Exit, Save As, and Save buttons to save macros.

Cancelling a macro

Clicking Cancel discards all changes made since opening or saving the macro, not just the changes made on the current tab of the Macro Editor.

Code Editor: Editing the XML script

Click Code Editor to open the Code Editor window.

The Code Editor window contains a text editing area that displays the XML script for the current macro and allows you to make changes directly to the XML commands in the script. All the XML commands in a macro script are commands belonging to Z and I Emulator for Web's XML-based macro language. For more information on this macro language, see The Macro Language in the Macro Programming Guide.

Make any changes you require. Then click OK, Verify, or Cancel:

Importing a macro

Click Import to import a copy of a Z and I Emulator for Web macro from the local file system into the Macro Manager. Before the import occurs, Z and I Emulator for Web prompts you to save any changes you have made to the current macro. The imported macro then becomes the current macro in the Macro Editor.

You can modify and save the imported macro. Clicking the Save button saves the macro in the current session. Clicking the Save As button allows you to save the macro to an alternate location.

Exporting a macro

Click Export to save the macro as a file on the local drive. You can then use the new file in other sessions or share it with other users.

Related topics

  • Using the Macro Manager
  • Macro Programming Guide