Created
September 22, 2018 04:31
-
-
Save UskeS/e1caf22b7cccf250002f1ff856f4eff3 to your computer and use it in GitHub Desktop.
[ExtendScript] SUIでプログレスバーを表示するサンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#targetengine session | |
var fonts = app.fonts; | |
var fontLength = fonts.length; | |
var fontList = []; | |
var dlg = new Window("palette"); | |
dlg.add("staticText", undefined, "フォントを読み込んでいます..."); | |
dlg.alignChildren = "fill"; | |
var pb = dlg.add("progressbar", undefined, 0, fontLength); | |
pb.preferredSize.width = 300; | |
var vt = dlg.add("staticText", undefined, "0/"+fontLength); | |
//vt.preferredSize = [100, 20]; | |
dlg.show(); | |
for (var i=0; i<fontLength; i++) { | |
fontList.push(fonts[i].fontFamily); | |
pb.value = i+1; | |
vt.text = pb.value + "/"+fontLength; | |
dlg.update(); | |
} | |
dlg.close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment