These commands let you pause your script to get input from the user. To create complex custom user interfaces, see Creating interfaces.
The confirmDialog command creates a modal window with a message to the user and any number of buttons.
The window disappears when the user presses any button or clicks the window’s close button.
key.
key.

confirmDialog -title "Confirm" -message "Are you sure?" -button "OK" -button "Cancel" -defaultButton "OK" -cancelButton "Cancel" -dismissString "Cancel";
The fileDialog command shows a file open dialog window.
The string may contain a path name, and must contain a wildcard file specifier. (for example "*.cc" or "/usr/u/*").

fileDialog -directoryMask "*.txt"
The promptDialog command creates a window with a message to the user, a text box, and any number of buttons.
key.
key.

// Show the dialog box:
string $text;
string $result = `promptDialog
-title "Rename Object"
-message "Enter Name:"
-button "OK" -button "Cancel"
-defaultButton "OK" -cancelButton "Cancel"
-dismissString "Cancel"`;
// Use the command again in query mode to
// get the text:
if ($result == "OK") {
$text = `promptDialog -query -text`;
}
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License