Dialog.MaskedInput

table Dialog.MaskedInput ( 

string  Title = "",

string  Prompt,

string  Mask,

string  DefaultText = "",

number  Icon = MB_ICONQUESTION,

string  PlaceHolder = " " )

Description

Presents an input dialog to collect information from the user in a specific format.

Parameters

Title

(string) The text to be displayed in the title bar of the dialog.

Prompt

(string) The text to be displayed above the edit field.

Mask

(string) The input mask to be used to control input into the edit field.

DefaultText

(string) The default text to display in the edit field. Defaults to an empty string (no text).

Icon

(number) The icon to display on the dialog:

CONSTANT

VALUE

DESCRIPTION

MB_ICONNONE

0

None.

MB_ICONSTOP

16

Stop.

MB_ICONQUESTION

32

Question. (Default)

MB_ICONEXCLAMATION

48

Exclamation.

MB_ICONINFORMATION

64

Information.

PlaceHolder

(string) Text used as a placeholder for the input mask. This can be used as sample input until the user fills the input mask. For example, if you used the telephone number input mask, you could include a sample digit as the placeholder such as 9. At runtime it would appear as (999) 999-9999 until the user replaced these digits with their own. The default is a blank space.

Returns

(table)  A table containing the user input text, indexed by the following keys:

KEY

TYPE

DESCRIPTION

Displayed

string

The text as displayed (including literals from the input mask).

Data

string

The data entered (not including literals from the input mask).

If the user presses the "Cancel" button on the dialog or an error occurs, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.

See also:  Related Actions