Go to: Synopsis. Return value. Flags. MEL examples.
 confirmDialog [-backgroundColor float float float] [-button string] [-cancelButton string] [-defaultButton string] [-dismissString string] [-message string] [-messageAlign string] [-parent string] [-title string]   
confirmDialog is undoable, NOT queryable, and NOT editable.
The confirmDialog command creates a modal dialog with a message to the user and a variable number of buttons to dismiss the dialog. The dialog is dismissed when the user presses any button or chooses the close item from the window menu. In the case where a button is pressed then the name of the button selected is returned. If the dialog is dismissed via the close item then the string returned is specified by the dismissString flag. The default behaviour when no arguments are specified is to create an empty single button dialog.| string | Indicates how the dialog was dismissed. If a button is pressed then the label of the button is returned. If the dialog is closed then the value for the flag dismissString is returned. | 
| Long name (short name) | Argument types | Properties | ||
|---|---|---|---|---|
| -title(-t) | string |   | ||
| 
 | ||||
| -message(-m) | string |   | ||
| 
 | ||||
| -messageAlign(-ma) | string |   | ||
| 
 | ||||
| -button(-b) | string |    | ||
| 
 | ||||
| -defaultButton(-db) | string |   | ||
| 
 | ||||
| -cancelButton(-cb) | string |   | ||
| 
 | ||||
| -dismissString(-ds) | string |   | ||
| 
 | ||||
| -parent(-p) | string |   | ||
| 
 | ||||
| -backgroundColor(-bgc) | float float float |   | ||
| 
 | ||||
|  Flag can appear in Create mode of command |  Flag can appear in Edit mode of command | 
|  Flag can appear in Query mode of command |  Flag can be used more than once in a command. | 
// Create an empty single button dialog.
//
// +-+----------------+
// |-| Confirm Dialog |
// +------------------+
// |                  |
// +------------------+
// | +--------------+ |
// | |   Confirm    | |
// | +--------------+ |
// +------------------+
//
confirmDialog;
// Create a basic Yes/No dialog.
//
// +-+----------------+
// |-|    Confirm     |
// +------------------+
// |  Are you sure?   |
// +------------------+
// | +-----+  +-----+ |
// | | Yes |  | No  | |
// | +-----+  +-----+ |
// +------------------+
//
confirmDialog -title "Confirm" -message "Are you sure?"
    -button "Yes" -button "No" -defaultButton "Yes"
    -cancelButton "No" -dismissString "No";