Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 87055

How can add a progress bar into script?

$
0
0

Hi,

 

I got a script for gen pdf

I want put a progress bar, and make it working

but I don't know where I can put the progress bar

and how

 

//=====================================================================

 

var doc = app.documents; 

app.findTextPreferences = null; 

app.findTextPreferences.underline = true; 

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

        var found = doc[i].findText(); 

        var _pages = []; 

        for(var j=0;j<found.length;j++) 

        { 

                var txfms = found[j].texts[0].parentTextFrames; 

                for(var k=0;k<txfms.length;k++) 

                { 

                        _pages.push(txfms[k].parentPage.name); 

                    } 

            } 

        for(var j=0;j<_pages.length;j++) 

        { 

                if(_pages[j] === _pages[j-1]) 

                { 

                        _pages.splice(j,1); 

                    } 

            } 

        if(_pages.length != 0) 

        { 

                app.pdfExportPreferences.pageRange = _pages.toString(); 

                doc[i].exportFile(ExportFormat.PDF_TYPE, new File(doc[i].fullName.toString().replace(/\.indd$/i,".pdf")), false); 

            } 

        _pages = []; 

    } 

//=================================================================== Can I put progress bar in here?

           var counter = new Window("palette");

           counter.prompt = counter.add("statictext",[0,0,80,20]);

           counter.show();

           var cells = app.activeDocument.allCellStyles;

           for(var i = cells.length-1; i > 0; i--){

           counter.prompt.text = String(i);

           cells[i].verticalJustification = VerticalJustification.bottomAlign;

           }

           counter.close();

 

//===================================================================

 

 

app.findTextPreferences = null;

 

alert("Done.");

 

thanks

 

Harvey


Viewing all articles
Browse latest Browse all 87055

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>