VARPROMPT
VARPROMPT
Â
requires parameter
number of parameters: 1, 2 or 3
Â
Usage: varprompt ‘‘varname’‘
- will bring up an input box without prompt, and the text the user types will be stored in varname
Â
varprompt ‘‘varname, Enter User ID’‘
- the input box will prompt for a User ID, the typed text will be stored in varname
Â
varprompt ‘‘varname, Enter Password, hide’‘
- the input box will prompt to Enter Password; the text the user types will be stored in varname, the text will be displayed as asterisks to hide it
Â
This command will prompt the user for the value of a variable. The first parameter, varname, is mandatory. It specifies the name that the variable will be recognized by later in the script.
The second and third parameters are optional. The second specifies the text that is going to be the title of the input box, and the third parameter specifies whether the text the user types will be displayed as normal characters or as asterisks (*), which is useful for password prompts.
Â
Note:Â - multiple parameters (if given) must be separated by commas
- to hide the entered text from prying eyes, the last parameter must be the word ‘hide’ (without the quotes), otherwise the text will be displayed as regular text
- the name/parameter pair must be enclosed by the delimiter if it contains spaces anywhere
- variables can only be used inside the script they were created in
Â
Â
Â