5 Replies Latest reply on Aug 15, 2012 5:52 AM by bduffy323

    progress bar issue

    bduffy323 Level 1

      I have looked through the forums and found simple examples for adding a progress bar, however whenever I add them I don't get the expected result.


      When running the script example found at http://www.kahrel.plus.com/indesign/scriptui.html for the progress bar, the palette pops up and shows 20% until it closes about 3 seconds later.


      When running Marc Autret's example found here http://forums.adobe.com/message/3152162#3152162 the palette pops up and reads "Processing Routine #1..." but the bar shows now progress.



      I am running them on CS5.5 on a mac. I may add that an adaption of Marc Autret's progress works wonderfully on a PC so I am assuming it is a MAC issue but I can't seem to figure it out.




      Does anyone else experience these issues?

        • 1. Re: progress bar issue
          Marijan Tompa [tomaxxi] Level 4

          Yes, it's a MacOS 10.7 issue. Everything works fine on 10.6. I'm not sure for 10.8.

          Quick fix is to add w.update() to HIT and RESET routine.


          Hope that helps.



          Marijan (tomaxxi)


          • 2. Re: progress bar issue
            bduffy323 Level 1

            When I added the w.update() the static text did update from "Processing Routine #1..." to Processing Routine #2..." however this text did get greyed out as opposed to being black when the w.update() was not there. However, the progress bar still did not update! Here is the code I am using. I am running it directly from the scripts panel to test before I implement one.



            var ProgressBar = function(/*str*/title)
                 var w = new Window('palette', ' '+title, {x:0, y:0, width:340, height:60}),
                      pb = w.add('progressbar', {x:20, y:12, width:300, height:12}, 0, 100),
                      st = w.add('statictext', {x:10, y:36, width:320, height:20}, '');
                 st.justify = 'center';
                 this.reset = function(msg,maxValue)
                      st.text = msg;
                      pb.value = 0;
                      pb.maxvalue = maxValue||0;
                      pb.visible = !!maxValue;
                 this.hit = function() {++pb.value;w.update();};
                 this.hide = function() {w.hide();};
                 this.close = function() {w.close();};
            //      SAMPLE CODE
            function main()
                 var pBar = new ProgressBar("Script Title");
                 var i;
                 // Routine #1
                 pBar.reset("Processing Routine #1...", 100);
                 for( i=0 ; i < 100; ++i, pBar.hit() )
                 // Routine #2
                 var i;
                 pBar.reset("Processing Routine #2...", 10);
                 for( i=0 ; i < 10; ++i, pBar.hit() )


            Running Mac OS X 10.6.8 CS5.5

            • 3. Re: progress bar issue
              bduffy323 Level 1

              I have found out why my progress bar is not being updated. The script that I was hoping to implement the progress bar in utilizes the line app.scriptPreferences.enableRedraw =false; to speed up the script due to a lot of placement and moving of page items. By adding this line the user cannot see the page items being moved so I wanted to show them a progress bar (since I know how many items need to be placed and repositioned) instead of staring at a locked up indesign page. However when enableRedraw is false, the progress bar does not update...when it is true, the progress bar does update. This is only an issue on a mac, the progress bar updates either way on a PC. Is this a bug that adobe is aware of?

              • 4. Re: progress bar issue
                Peter Kahrel Adobe Community Professional & MVP

                > Is this a bug that adobe is aware of?


                Maybe, but do tell them anyway (http://www.adobe.com/support/feature.html). The more you complain, the more chance it'll get fixed.



                • 5. Re: progress bar issue
                  bduffy323 Level 1

                  Thanks for pointing me to the right link. I submitted the bug. If anyone in the mean time finds a solution/work-around I would love to hear it.