Go to: Synopsis. Flags. Return value. MEL examples.
progressWindow [-endProgress] [-isCancelled] [-isInterruptable] [-maxValue int] [-minValue int] [-progress int] [-status string] [-step int] [-title string]
progressWindow is undoable, queryable, and editable.
The progressWindow command creates a window containing a status message, a graphical progress gauge, and optionally a "Hit ESC to Cancel" label for interruptable operations. Only one progress window is allowed on screen at a time. While the window is visible, the busy cursor is shown.| Long name (short name) | [argument types] | Properties | ||
|---|---|---|---|---|
-isCancelled(-ic)
|
|
|
||
|
||||
-progress(-pr)
|
int
|
|
||
|
||||
-step(-s)
|
int
|
|
||
|
||||
-minValue(-min)
|
int
|
|
||
|
||||
-maxValue(-max)
|
int
|
|
||
|
||||
-title(-t)
|
string
|
|
||
|
||||
-status(-st)
|
string
|
|
||
|
||||
-isInterruptable(-ii)
|
|
|
||
|
||||
-endProgress(-ep)
|
|
|
||
|
||||
// +-+------------------+
// |-| Doing Nothing |
// +--------------------+
// | Sleeping: 40% |
// | |
// | +----------------+ |
// | ||||||| | |
// | +----------------+ |
// | |
// | Hit ESC to Cancel |
// +--------------------+
// Always use the progress dialog from a script, never directly
// from the Script Editor.
int $amount = 0;
progressWindow
-title "Doing Nothing"
-progress $amount
-status "Sleeping: 0%"
-isInterruptable true;
while (true) {
// Check if the dialog has been cancelled
if ( `progressWindow -query -isCancelled` ) break;
// Check if end condition has been reached
if ( `progressWindow -query -progress` >= 100 ) break;
$amount += 5;
progressWindow -edit
-progress $amount
-status ("Sleeping: "+$amount+"%");
pause -seconds 1;
}
progressWindow -endProgress;