Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

break long process in CC 2014 (Mac OS)

$
0
0
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



Viewing all articles
Browse latest Browse all 12845

Trending Articles