Copy link to clipboard
Copied
how to change the statictext text value during run time??
for eg, if my dialog box (which contains a static text n a button) is being displayed, so i want the statictext text value to change whn i click on the button...
Hi. try this snippet.
var w = new Window('dialog',"test");
var t = w.add('statictext', undefined, "1");
var b = w.add('button', undefined, "+1");
t.characters = 3;
b.onClick = function() {
t.text = (t.text-0)+1;
}
w.show();
And then
You should refer <a href="http://www.kahrel.plus.com/indesign/scriptui.html">ScriptUI for dummies | Peter Kahrel</a>
This PDF contains many many helps for coding ScriptUI.
thankyou
mg.
Copy link to clipboard
Copied
Hi. try this snippet.
var w = new Window('dialog',"test");
var t = w.add('statictext', undefined, "1");
var b = w.add('button', undefined, "+1");
t.characters = 3;
b.onClick = function() {
t.text = (t.text-0)+1;
}
w.show();
And then
You should refer <a href="http://www.kahrel.plus.com/indesign/scriptui.html">ScriptUI for dummies | Peter Kahrel</a>
This PDF contains many many helps for coding ScriptUI.
thankyou
mg.
Copy link to clipboard
Copied
thanks..it worked!!