Hello to all
I want to make a form that would be a granular user to choose from a specific list of values to be passed as a parameter. Here's a script, it creates what I need, but the names of the radio buttons are not unique.Can you please tell how to do so at the close of this form (window) I could get the value of the selected item from the list of radiobutton?
#target photoshop app.bringToFront(); var par = Array("Select your choise","test 1","test 2", "test 3"); var rez = ask(par); alert(rez) function ask(par){ wask = new Window('dialog', ''); wask.orientation = "column"; wask.alignment="top"; wask.spacing=0; grs0 =wask.add('group'); grs0.spacing=0; grs0.add('statictext', undefined, par[0]); grs0.alignment="top"; grs0.preferredSize.height = 40; grs1 =wask.add('group'); grs1.spacing=0; grs1.alignment="left"; grs1.preferredSize.height = 20*par.length; grs1.orientation = "column"; for(var i=1;i<par.length;i++){ var g = grs0 +i; r= "rb"+i; r = grs1.add("radiobutton", undefined, par[i]); r.alignment="left"; } bt1 = wask.add ("button", undefined, "Select"); bt2 = wask.add ("button", undefined, "Close"); bt1.onClick = function(){ } wask.show(); }