var win = new Window("palette", "SnpCreateProgressBar", undefined); win.pnl = win.add("panel", undefined, "Script Progress"); win.pnl.progBarLabel = win.pnl.add("statictext", undefined, "0%"); var btn = win.pnl.add ("button", undefined, "Cancel"); btn.onClick = function() { win.close(0); } win.show(); var i = 0; while(i < 200) { win.pnl.progBarLabel.text = i + "%"; $.sleep(30); win.update(); i++; // activeDocument.textFrames[0].contents = i + ""; redraw(); } alert('Done!'); win.close();
button not work
MacOS
Giveway tothe user to break the script