hmm. really nice ideea. also shoud make the export process a bit faster. so: //here is progressbar code by (i think) Peter Kahrel, a bit modified 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'; w.center(); this.reset = function (msg, maxValue) { st.text = msg; pb.value = 0; pb.maxvalue = maxValue || 0; pb.visible = !! maxValue; w.show(); }; this.hit = function (progress) { pb.value=progress; }; this.hide = function () { w.hide(); }; this.close = function () { w.close(); }; }; var myFolder=Folder(app.activeDocument.filePath).selectDlg("PDF folder:"); if (myFolder){ var pBar = new ProgressBar("Export"); for (var i=0; i<app.documents.length; i++) { myDoc=app.documents; expFile = File( myFolder+ '/'+ myDoc.name + '.pdf' ); var myTask=myDoc.asynchronousExportFile(ExportFormat.PDF_TYPE,expFile,false,app.pdfExportPresets[1]); pBar.reset(myDoc.name,100); while (myTask.percentDone<100) { pBar.hit(myTask.percentDone) } } alert("Done"); }else{alert("Canceld");} still no luck. gets stuck in the while loop.
... View more