Home > Language Reference > User Dialog Functions > InputBoxSecret$

InputBoxSecret$

The InputBoxSecret$ function displays a prompt in a dialog box, waits for the user to input text hidden by asterisks or click a button, and then returns a string containing the contents of the text box.

Usage

Used to ask user a password which can be used later in the script.

Syntax

var$=InputBoxSecret$(<prompt> [, [<title>][, [<default_answer>][, [<x>], [<y>]]]])>]

Parameters

<prompt>, string, message in the dialog box. 

<title>, optional, string, text displayed in the title bar of the dialog box. 

<default_answer>, optional, string, default response if no input is provided.

<x>,<y>, optional, integers, coordinates of the topleft point of the dialog box.

Return value

var$, string, input text typed by user in the dialog box. The input text is hidden with asterisks but var$ returns the exact text as typed by the user. If the Cancel button is clicked, var$ returns "ID_CANCEL".

See also

InputBox$

Examples

var$ = InputBoxSecret$("Type your answer below:","Inputbox Title", "Today")
msgbox(var$) 
    
prompt$="Type your answer below:"
title$="InputBox Title"  
default$="Default answer"
x=100
y=120
var$ = InputBoxSecret$( prompt$, title$, default$, x, y)
msgbox(var$)
    
var$ = InputBoxSecret$( prompt$)

var$ = InputBoxSecret$( prompt$, , , 100, 100)