Using variables

Variables are one of the most powerful macro features. Using variables is like writing your own macro-driven application. With variables, you can create interactive macros that respond to user input and perform specific sets of commands.

To open the Variable Setup dialog box:

  1. Select Tools > Edit Macro to open the Macro Editor dialog box.
  2. Right-click in the macro display area.
  3. Choose Variable Setup from the popup menu.

In the Variable Setup dialog box, you can select a variable, such as a password or user ID, and define its value based on host screen information, static text, and user input. The variable values are available for the Type, Message, Compare Values, Goto Label, and Prompt commands.

For example, you could create a prompt dialog box to request a password from a user, then save it as a variable. The variable containing the user password is then available for any Type, Compare Values, and Message commands you have included in the macro sequence. For example, you could use a Compare Values command to check the password, then end the macro or even disconnect the PC from the host.