info.mailtraq.com > Management > Script Functions A-Z > InputDlg() InputDlg()Places a dialog box for user input at centre-screen of the machine on which Mailtraq is running. Script execution is halted until the user responds to or dismisses the dialog. Keyboard input from the user while the dialog is displayed is held in a nominated variable.
result := InputDlg( title , prompt , input )
title
A string to display in the title bar of the dialog
prompt
A string to display in the dialog to prompt the user for appropriate input
input
A string to display, usually an example, in the user input textbox of the dialog. User input is also captured to this variable.
result
Boolean: "TRUE" if dialog accepted; "FALSE" if cancelled
Run the following example to demonstrate usage source := "user@example.invalid";
input := source;
result := InputDlg("Dummy Subscription Search",
"Please enter an address dummy", "input");
If(result,
If(input = source,
MessageDlg("You didn't change the address dummy!", "W"),
If(Length(input) > 0,
MessageDlg("You wish to search for " ++ input ++ "?",
"C", "Yes, No, Cancel"),
MessageDlg("You deleted the input address!", "E", "Ok")
)
),
MessageDlg("You cancelled the dialog, didn't you?", "C",
"Ok, Yes, No, Cancel")
) |