Get Password Dialog Box

The getpassword command displays the Get Password dialog box and prints the password entered by the user. It's syntax is as follows:

getpassword [<title>="Enter password" [<label>="" [displaymode=1 [errormsg=""]]]]

The "title" is the text which is displayed on the titlebar of the Get Password dialog box. It's default value is "Enter password".

The "label" is the text which is shown to the user.

The "displaymode" is the behaviour of the text box where the user enters password. It can have values 0,1 or 2. Default value is 1. The table below shows the behaviour of each displaymode.

ValueBehaviour
0Does not display anything. This may be appropriate for passwords where even the length of the password should be kept secret.
1Displays asterisks instead of the characters actually entered.
2Displays characters as they are entered while editing otherwise displays asterisks.

The "errormsg" is the error message which gets printed when the user closes the Get Password dialog box by clicking on the Cancel button or if password is not entered.

Example: getpassword "Type Password" "Enter password to login:"

Get Password - FireCMD

The above command displays a Get Password dialog box with title "Type Password". "Enter password to login:" is the label displayed.


Documentation Index Page