ssCore.App.showInputBox

Display an input dialog box to prompt the user for a simple string value and return the result.


Availability:

First available in version 3.0 build 2163.


Input Parameters:

prompt - The prompt to be displayed in the message box. Newline and tab characters may be used.

title - [Optional] - Text that should appear in the title bar of the message box, the default is the current application title.

text - [Optional] - Specifies the default text that should appear in the input area.


Output Parameters:

result - Returns the text entered by the user or an empty string if the input box was closed or cancelled.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.App.showInputBox( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.App.showInputBox( paramsObject );


Notes:

None.


Examples:

// Make sure the window is visible.
ssCore.Win.show();

var return_obj = ssCore.App.showInputBox({prompt:"Please enter your password", title:"Password"});

ssDebug.trace(return_obj.result);