Hi, I have script for dialog with radio buttons, but I need it to be with check boxes instead ( in Illustrator CS6, javascript 😞 var myDoc = app.activeDocument; dialogSelection (); function dialogSelection (docSize){ /////////////// DialogBox Definition/////////////////////// var resultBox=false; var ressource="dialog { \ text: 'Standard Spot Colors', frameLocation:[100,100], \ MyPanelTemplates: Panel { orientation:'column', alignChildren:['left','Top'], \ text: 'Please select Spot Color', \ title: Group { orientation: 'column', \ myColor1: RadioButton { alignment:'left', text: 'Red', value:true}, \ myColor2: RadioButton { alignment:'left', text: 'Green', value:false}, \ myColor3: RadioButton { alignment:'left', text: 'Blue', value:false}, \ } \ }, \ Valid: Panel { orientation:'column', alignChildren:['left','Top'], \ title: Group { \ CancelBtn: Button { text: 'Cancel', properties:{name:'cancel'} }, \ OkBtn: Button { text: 'OK', properties:{name:'ok'} }, \ } \ }, \ }"; /////////////////////////////////////////////////////////// var dlg = new Window(ressource); //build dialog box dlg.Valid.title.OkBtn.onClick=function(){ //VALID Button test resultBox=true; dlg.close(); return resultBox; }; dlg.show(); // show dialogbox if (resultBox){ // if press OK button if (dlg.MyPanelTemplates.title.varRoundedBC.value){ myColor1 = "Red"; addHPIWhite ('spotwhite', 50, 0, 0, 0); } if (dlg.MyPanelTemplates.title.varFlower.value){ myColor2 = "Green"; addHPIWhite ('spotwhite', 50, 0, 0, 0); } if (dlg.MyPanelTemplates.title.varHeart.value){ myColor3 = "Blue"; addHPIWhite ('spotwhite', 50, 0, 0, 0); } } } function addHPIWhite(name, c, m, y, k) { try { swatch = app.activeDocument.swatches[name]; // if swatch exists.... addSpot (name+='1', c, m, y, k); // ...add 1 to swatch name } catch (e) { var newSpot = app.activeDocument.spots.add(); newSpot.name = name; var newColor = new CMYKColor(); newColor.cyan = c; newColor.magenta = m; newColor.yellow = y; newColor.black = k; newSpot.colorType = ColorModel.SPOT; newSpot.color = newColor; var newSpotColor = new SpotColor(); newSpotColor.spot = newSpot; } } Thank you for your help. Yulia
... View more