Script GET Statement

GET _varname [HIDDEN] [LABEL="string"]

The GET statement is used to accept input from the keyboard.

When a GET statement is reached in the script, text entry box is displayed in which the user may type. Typed characters, up to but not including the first carriage return, are placed in _varname.

All typed input is scanned for a colon character (:). If found, GET returns only the characters that follow the colon.

If the HIDDEN keyword is present, the typed characters are not displayed in the input box.

If both the HIDDEN and LABEL keywords are present, HIDDEN must be first.

For example, the statements

ECHO "Please enter your password:"
GET _passwd HIDDEN


Please enter your password:

in the session window and prompts you for your password with an Enter User Data pop-up box:



When your password is entered, it is stored in the _passwd variable but not displayed.

Use the LABEL keyword to specify your own message in the pop-up box. For example:

GET _passwd HIDDEN LABEL="Please type your password:"

causes the following dialog to be displayed:

Copyright © 2017 American Chemical Society. All Rights Reserved.