InputBox

From Wiki

Jump to: navigation, search
This article is written by Konrad, thus using rather nonstandard English:)

InputBox (DNM Script function)

full declaration

string InputBox (string strQuestion,[string sFlags=""])

return value

string

description

Displays a window with an edit box and 'OK', 'Cancel' buttons. Users can enter data into the edit box which will be returned by this function.

Additionally, GetLastAdditionalResult will return button code pressed by User (IDOK or IDCANCEL).

sFlags argument may be one of the following:

"" (empty): the default, simple one-line editbox.

"multiline" : shows a bigger dialog box, with multiline editbox.

Example:

var $s=InputBox("Enter your name");
if(GetLastAdditionalResult()==IDCANCEL)
MessageBox("You pressed cancel...");
else MessageBox("Hello "+$s+"!");
Personal tools
konradp.com