In this article
Banana.Application.ProgressBar is the interface to the program progress bar and can be accessed through Banana.application.progressBar. The progressBar object is used to give the user an indication of the progress of an operation and the possibility to interrupt the running process. The progress bar is showed in bottom left corner of the application windows.
Methods
start(maxSteps)
Start the progress indicator and define the number of steps this operation needs before being complete. You can call several times this method to split the progress in main and sub steps. Every call of the method start() should be paired with a call of the method finish().
Introduced in 7.0.2.0
step([stepCount])
Advance the progress indicator of stepCount steps. If stepCount is not defined it advance of one step.
Returns false if the user canceled the operation, otherwise true.
Introduced in 7.0.2.0
finish()
Notify that the operation has been completed and close the progress bar.
Introduced in 7.0.2.0
Example
var progressBar = Banana.application.progressBar; progressBar.start(3); // Three main steps in script progressBar.start(rowCount) // Main step 1 has rowCount steps for (i=0;i < rowCount; i++) { ... if (!progressBar.step(1)) return; // Operation canceled by the user } progressBar.finish(); // Main step 1 completed ... // Main step 2 doesn't have sub steps progressBar.step(1); // Main step 2 completed progressBar.start(10) // Main step 3 has 10 steps for (i=0;i<10;i++) { ... if (!progressBar.step(1)) return; // Operation canceled by the user } progressBar.finish(); // Main step 3 and script completed