Skip to main content
June 3, 2009
Question

Script for showing status

  • June 3, 2009
  • 1 reply
  • 713 views

Hi Guys,

I need a script, that will show the status of the script

for example,

It is creating a paragraph styles then, Like vb label, it has to show,

"Paragraphy style creating"

something like this.

regards,

sudar.

This topic has been closed for replies.

1 reply

interesting_Flower157F
Inspiring
June 4, 2009

A JavaScript example:

#targetengine "session"
var myProgressPanel;
var myMaximumValue = 100; // should be set to the amount of cycles (could be myDocument.pages.length, for a script looping all pages)

var myProgressBarWidth = 300; // width in the window
var myIncrement = myMaximumValue/myProgressBarWidth;
myCreateProgressPanel(myMaximumValue, myProgressBarWidth);

var myProgressPanel = myCreateProgressPanel(myMaximumValue, myProgressBarWidth);
myProgressPanel.show();

for (i = 0; i < myMaximumValue; i++) {
     myProgressPanel.myProgressBar.value = i;
     myProgressPanel.myStatus.text = "Cycle number: " + i ;
     for (n = 0; n < 10000; n++) {
         myProgressPanel.mySecondaryStatus.text = "Sub cycle number: " + n;
     }
}

myProgressPanel.close();

function myCreateProgressPanel(myMaximumValue, myProgressBarWidth){
     myProgressPanel = new Window('window', 'Progress');
     with(myProgressPanel){
         myProgressPanel.myStatus = add('statictext', [12, 12, 300, 30], 'Working ...', {alignment: "left"});
         myProgressPanel.mySecondaryStatus = add('statictext', [12, 12, 300, 30], 'Working ...', {alignment: "left"});
         myProgressPanel.myProgressBar = add('progressbar', [12, 12, myProgressBarWidth, 24], 0, myMaximumValue);
     }
     return myProgressPanel;
}

Hope this helps you

--

Thomas B. Nielsen

http://www.nobrainer.dk