AskFor "message text"[,password][,$variable][,"default data"][,WindowPos(top,left)]
Where:
message text | is text telling the user what to enter into the AskFor dialog box. |
password | an optional keyword that indicates asterisks (*) are displayed rather than the text the user types into the AskFor dialog box. |
$variable | an optional variable name. The data the user types into the AskFor dialog box is associated with this variable instead of typed on the screen. If the variable already contains data and no default data is specified on the AskFor command; the variable data appears as the default data in the edit box within the AskFor dialog |
default data | this text appears in the edit box within the AskFor dialog. The user can accept this data by pressing enter or change it by typing over it. |
WindowPos(top,left) | specifies the position of the top left corner of the AskFor dialog box. top and left are the offset in pixels from the top left corner of the TN3270 Plus main window. The offset may be negative to move the dialog box outside the TN3270 Plus window. If this parameter is not specified, the dialog box is displayed in the center of the TN3270 Plus main window. |
top and left may be variables.
The AskFor command displays a dialog box requesting information from the user. The AskFor dialog box displays the message text and the user accepts the default data or types the requested data into the edit box. When the user clicks the OK button the characters from the edit box are typed into the session or placed in the optional $variable. The AskFor command is a good way to provide additional information to lead inexperienced users through a process.
Examples
AskFor | "Enter your userid and then click OK",John |
AskFor | "Enter your last name and click OK",Doe |
AskFor | "Enter your password",password |
AskFor | "Enter your name",$NAME,"John Doe",WindowPos(10,10) |
The following script asks the user for logon information.
Askfor | "Enter your userid and click OK" |
key | tab |
AskFor | "Enter your password and click OK",password |
key | enter |
exit
See Also:
TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.