Like the ask command, it produce a window where you can enter a password, instead of characters, asterisks will appear :
ask password "Write your password:"
ask password [clear] question [with defaultAnswer] [titled windowTitle] [as sheet]
Displays a dialog box like the ask command, but with the characters the user types displayed as asterisks (*) for privacy.
ask password "Please enter password" get mcEncrypt(it)
ask password "Please log in." titled "Millenium Group Intranet"
ask password empty with savedPassword as sheet
ask password "Please log in:" with "PASSWORD" titled "Password Test"
Use the ask password command to provide privacy for the information the user types. For example, if the user is in a public place, the information might be seen by someone looking over his or her shoulder. This command does not encrypt the text the user types, but you can use ask password to implement a secret password with the syntax shown in the example section..
If you use some HTML tag, the text is interpreted as HTMLText. Use this feature to customize text.
- question - Is a string or any expression that evaluates to a string.
- defaultResponse - Is placed in the text box when the dialog box appears. If no defaultResponse is specified, the text box is empty when the dialog box appears.
- windowTitle - If specified, appears in the title bar of the dialog box. If no windowTitle is given, the title bar is blank.
The text contents of the text box is placed in the it variable. If the user cancels the dialog, the it variable is set to empty, and the result function returns "cancel".
If the ask password clear form is used, the text box is not encrypted, and the it variable contains whatever the user entered (this is the default behavior).
If the ask password...as sheet form is used, the dialog box appears as a sheet on OS X systems. On other systems, the as sheet form has no effect and the dialog box appears normally. Attempting to open a sheet from within another sheet displays the second stack as a modal dialog box instead.
Changes: 'ask password clear' set to the default behavior at version 6.0.0 to provide compatibility across all platforms.