Adding a prompt during macro recording
A prompt is a popup window that appears during macro playback and that requests information from the user.
The prompt popup window contains text, an input field, and three buttons (OK, Cancel, Help). The text solicits information from the user (for example, "Enter a user ID:"). Typically the user types characters into the input field (such as "myuserid") and then clicks OK. The macro runtime then reads the text from the input field, removes the popup window, and types the same text into the session window beginning at a particular row and column location that you specify. Thus this action allows a macro to solicit text input from the user and then to type this text as keystrokes into a particular location in the session window.
For more information see Editing macro screens: Actions (Prompt) in the online help and Prompt action (<prompt> element) in the Macro Programming Guide
- Row and Column
- The row and column in the session window where the macro runtime begins typing the text that the user enters. For example,
if Row is 4 and Column is 12, then the macro runtime types the text into the session window beginning at row 4, column 12.
When the Add a Prompt window appears, the Row and Column fields are set to the current row and column location of the text cursor. You can type in different values.
- Prompt Name
- The text that you want to appear to the left of the input field in the popup window. Typically this text states the type of
information requested. For example, if you want the user to enter a user ID, the prompt text could be Enter your user ID:.
Remember that if the checkbox for Use Variables and Arithmetic Expressions in Macro is checked then the text must be enclosed in single quotation marks (for example, 'Enter your user ID:').
- Default value
- Text that the macro runtime initially displays in the input field of the popup window as a default response from the user.
The user can either retain this default response or type a different response instead. For example, if the input field is for a
file name, the default text could be MyFile. The user could keep this text or type in a different file name.
If you do not want to provide a default value, leave this field blank.
- Prompt Title
- The text that you want to appear as the prompt window title. If this field is left blank or if there are multiple prompts in the macro and the macro is configured to show all prompts at the start of the macro, the title will be "Prompt".
- Value required
- Determines whether the macro runtime disables the OK button of the popup window until the input field of the popup window
contains text. The input field can contain text either because you have specified a default response (Default Value) or because
the user has typed text into the input field.
- If you check this checkbox:
- The macro runtime displays the text string
(required)
to the right of the input field, to indicate to the user that input is required for this input field. - The macro runtime does not enable the OK button on the popup window until the input field of the popup window contains text. Thus, if you have not provided a Default Value, the user is forced either to type a response before clicking OK or else to click Cancel.
- The macro runtime displays the text string
- If you do not check this checkbox:
- The macro runtime does not display the text string
(required)
to the right of the input field. - The macro runtime enables the OK button on the popup window as soon as the popup window is displayed. Thus the user can click OK even if the input field is blank.
- The macro runtime does not display the text string
If several prompt actions in the macro have the Require Response field set to true (you checked the Value required checkbox for several prompts), and if also the Show all Prompts at Start of Macro field is set to true on the Macro tab, then at the start of macro playback, when the macro runtime displays all the prompt input fields in a single popup window, the macro runtime does not enable the OK button on the popup window until every required input field contains text.
- If you check this checkbox:
- Is it a Password?
- Determines whether the macro runtime treats the text that the user types into the input field as confidential information,
such as a password.
- If this checkbox is checked, then the macro runtime displays the text in the input field using an asterisk ('*') for each character.
- If this checkbox is not checked, then the macro runtime displays the text normally.
- Clear Host Field
- Determines whether the macro runtime, before typing the text into the session window beginning at the specified Row and
Column location, clears the field in the session window that contains that Row and Column location.
- If this checkbox is checked, then the macro runtime clears the field in the session window to blanks before typing the text.
- If this checkbox is not checked, then the macro runtime does not clear the field. Instead, the macro runtime types the text into the session window on top of whatever text may already be displayed at that location.