Recording a Macro

Macros can be recorded, written directly, or recorded and then edited. Because the script language is based on Microsoft VBScript, PASSPORT macros may be used as a starting point for more complex Visual Basic programs. Before you record a macro, you should carefully plan the steps involved, especially any outside steps that might require a pause in the script, or steps requiring the insertion of a wait condition or prompt.

To record a macro

  1. Select the Macro>Record command.

  2. Carry out the steps in the order that you want them executed in the macro.

  3. Select the Macro>End Record command or press the End Record Macro button. The Save As dialog box will appear.

  4. Enter a descriptive file name for the macro script, making sure that it ends with a .zmc extension (if you do not specify the extension, it will automatically be created for you), and then click Save. If you store macros in another folder, navigate to that folder first.

    Note:
    If you name the macro "User1.zmc", "User2.zmc", etc., you will be able to access it quickly from the toolbar using the appropriate macro button (Run USER1.ZMC, Run USER2.ZMC, and so on). The macro file names are not case sensitive.

To pause the recording of a macro

PASSPORT allows you to pause the recording of a macro at any time. This may be useful to avoid the recording of certain keystrokes.

  1. Choose the Macro>Pause command.

  2. Perform any operations that you do not want recorded while in PAUSE mode.

  3. When you are ready to resume recording the macro, choose the Macro>Pause menu command again.

Inserting a prompt allows you to notify or receive input from the user before the execution of the macro proceeds to the next statement. For confidential input such as passwords, you can specify that user-entered text be hidden from display.

To insert a prompt into a macro

Inserting a wait condition allows you to specify certain conditions to check before the execution of the macro proceeds to the next statement.

  1. Use the Macro>Insert Prompt menu command and the Insert Prompt dialog box will appear.

  2. Select the type of prompt you want to insert from the list of options.

  3. Enter the text you want to display on the message/dialog box.

  4. Click OK, and then proceed with the remainder of the macro.

To insert a wait condition into a macro

  1. Use the Macro>Insert Wait menu command and the Insert Wait dialog box will appear.

  2. Select a wait condition from the list of available options, entering any appropriate parameters.

  3. Enter a time-out value if one is not already specified.

  4. Click OK, and then proceed with the remainder of the macro.