2 Replies Latest reply on Dec 27, 2013 3:43 AM by Mahesh_JW

    Progress Bar not closing

    Mahesh_JW

      Hi All,

       

      I am running my scripts from "Adobe Scripts" it runs successfully, but the progress bar window not closing. I run four times. It appears four progress bar window.

      Screen shot 2013-12-27 at 1.34.14 PM.png

       

      What can I do? Plz help...

       

       

      Thanks In Advance,

      Mahesh

        • 1. Re: Progress Bar not closing
          Mi_D Level 3

          Without see the code it's it difficulte where u missout so batter you post your code.

           

          testing i run one semple script it working fine

           

          #target indesign

          var loop = new Array (20);

          var w = new Window ('palette');

          w.pbar = w.add ('progressbar');

          w.pbar.preferredSize.width = 300;

          w.show();

          for (var i = 0; i < loop.length; i++){

          w.pbar.value = i+1;

          $.sleep(200)

          }

           

          Mi_D

          • 2. Re: Progress Bar not closing
            Mahesh_JW Level 1

            Hi Mi_D,

             

            This is my Main Script in the following path:

            /Users/laser/Documents/Adobe Scripts/MainScript.jsx

             

            MainScript.jsx

            ~~~~~~~~~~~

            #target "indesign-7.0"

            var ScripPah = "/Users/laser/Documents/Adobe Scripts/Test/main_validation.jsx";

            var rep = app.doScript(File(ScripPah),1246973031);    //1246973031 - ScriptLanguage.JAVASCRIPT

             

             

             

            main_validation.jsx

            ~~~~~~~~~~~~~~

            app.activate();

            app.scriptPreferences.version = 6.0;

             

            var myPrs = new Window('palette', 'X2I',{x:0, y:0, width:400, height:90});

            var prgsBar_FileName = myPrs.add('statictext',{x:10, y:10, width:390, height:15}, "");

             

            myPrs.active = true;

            myPrs.show();

             

            .

            .

            .

            .

             

            open Library

             

            myPrs.active = true;

            myPrs.show();

             

             

            open Template

             

            myPrs.active = true;

            myPrs.show();

             

            prgsBar_FileName = "ABC.indd"

            .

            .

            My Functions

            .

            .

            .

            myPrs.close();

             

             

             

             

             

            when I double click my "MainScript.jsx" it runs in InDesign CS5 successfully but progress bar not closing once the script execution is completed.

            Please advice....

             

             

            Thanks,

            Mahesh