DialogEx.Close

boolean DialogEx.Close (

number ReturnCode )

Description

Closes the current dialog with a specific return code.

Note: If the user closed the dialog using the close button on the window, IDCANCEL (2) will be returned.

Note: You cannot close a dialog while a status dialog is visible.

Tip: Dialogs can be shown using the DialogEx.Show action.

Tip: If you need to prevent the user from closing the dialog or want to add a confirmation message, you can use the built-in function QueryAllowDialogClose.

Parameters

ReturnCode

(number) The value to return from the dialog. This is the value that will be returned by the DialogEx.Show action.

Returns

(boolean) True if the dialog was closed successfully, or false if it was not. 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