Previous Page Contents Page Next Page

5.2 Creating Macros

There are two ways of creating macros:

You can also combine these two methods by recording a macro directly in a session window and then editing it in text form in the style file.

5.2.1 Recording Macros

You can record a macro from a session window by following these steps:

  1. Start recording the macro by doing one of the following:

    • Click on the Record button from the toolbar.

    • Select RECORD_MACRO from the Keys Menu.

    • Press the RECORD_MACRO keystroke (whose default mapping is Esc Ctrl + R).

  2. Type the keystrokes that you want to record. These keystrokes are sent to the display application. You cannot record keystrokes that activate session window menus in a macro (they are ignored).

    If you wish to insert a marker into the macro you are recording so that when the macro is replayed it will pause and wait for user input, do one of the following:

    • Click on the Waiting button from the toolbar.

    • Select MACRO_WAIT_INPUT from the Keys menu.

    • Press the MACRO_WAIT_INPUT keystroke (whose default mapping is Esc Ctrl + W).

    To continue recording the macro again, press one of the following keys: CLEAR, ENTER, ERASEINP, HELP, PA1, PA2, PA3, PRINT, ROLLDOWN, ROLLLEFT, ROLLRIGHT, or ROLLUP.

    You can also pause the recording by doing one of the following:

    • Click on the Pause button from the toolbar.

    • Select PAUSE_MACRO from the Keys menu.

    • Press the PAUSE_MACRO keystroke (whose default mapping is Esc Ctrl + P).

    Pausing the macro enables you to enter other keys, which are not recorded as part of the macro. When you wish to continue recording the macro, click on the Pause button again, or use the PAUSE_MACRO keystroke.

  3. Stop recording the macro by doing one of the following:

    • Click on the Stop button from the toolbar.

    • Select STOP_MACRO from the Keys menu.

    • Press the STOP_MACRO keystroke (whose default mapping is Esc Ctrl + S).

    If you try to record the ATTN, SYSREQ, TESTREQ, or ERRHELP keystroke as part of your macro, this will also stop recording the macro.

Previous Page Contents Page Top of Page Next page