The renewal maintenance has officially ended for Progress iMacros effective November 30, 2023.
This Wiki site will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely, The Progress Team
Difference between revisions of "PROMPT"
Line 1: | Line 1: | ||
− | + | Displays a popup to ask for a value. This value is stored in variable_name. This command can only be used to change the variables !VAR1, !VAR2 or !VAR3, but not built-in variables like !DATASOURCE or dynamically generated variables. | |
− | |||
− | |||
− | |||
− | |||
=== Syntax === | === Syntax === | ||
− | + | PROMPT prompt_text variable_name [default_value] | |
=== Parameters === | === Parameters === | ||
− | + | *prompt_text | |
+ | *:The text which is to be displayed above the input text field. Remember to use the escape character <SP> for whitespaces. | ||
+ | *variable_name | ||
+ | *:Name of the variable to save the user input in. | ||
+ | *default_value | ||
+ | *:Default value which will be displayed in the input field when the dialog comes up. Must not be a value of a built-in variable except !VAR1, !VAR2 or !VAR3. | ||
=== Examples === | === Examples === | ||
− | + | If you do not want to save passwords (even encrypted) in on your computer, use the following code to ask for the password: | |
+ | |||
+ | PROMPT Please<SP>enter<SP>your<SP>password: !VAR1 | ||
+ | |||
+ | Suppose you would like to ask for more then three inputs from the user. Since you only have three variables to use the PROMPT command for, you might run into problems. The solution is to navigate to the site where you are going to fill the values in, then ask for the first three inputs, fill them into the website, ask for the next three values, fill them in etc. | ||
=== See Also === | === See Also === | ||
− | [[ | + | [[SET]], [[CMDLINE]], [[PAUSE]] |
Revision as of 08:02, 22 April 2007
Displays a popup to ask for a value. This value is stored in variable_name. This command can only be used to change the variables !VAR1, !VAR2 or !VAR3, but not built-in variables like !DATASOURCE or dynamically generated variables.
Syntax
PROMPT prompt_text variable_name [default_value]
Parameters
- prompt_text
- The text which is to be displayed above the input text field. Remember to use the escape character <SP> for whitespaces.
- variable_name
- Name of the variable to save the user input in.
- default_value
- Default value which will be displayed in the input field when the dialog comes up. Must not be a value of a built-in variable except !VAR1, !VAR2 or !VAR3.
Examples
If you do not want to save passwords (even encrypted) in on your computer, use the following code to ask for the password:
PROMPT Please<SP>enter<SP>your<SP>password: !VAR1
Suppose you would like to ask for more then three inputs from the user. Since you only have three variables to use the PROMPT command for, you might run into problems. The solution is to navigate to the site where you are going to fill the values in, then ask for the first three inputs, fill them into the website, ask for the next three values, fill them in etc.