Select Spot color using given CMYK values
Hi community good afternoon, can anybody help me with this? I have the following code:
var doc = app.activeDocument;
function SelectSpecificColor () {
doc.selection = null;
var cmykCol = new SpotColor();
cmykCol.cyan=2;
cmykCol.magenta=100;
cmykCol.yellow=2;
cmykCol.black=2;
doc.defaultFillColor = cmykCol;
app.executeMenuCommand("Find Fill Color menu item");
app.redraw();
//alert(doc.selection.length)
// }
}
SelectSpecificColor();
which looks for a CMYK value to select all objects/items in the document with that values, BUT when I turn that object into spot color it is not selecting it anymore, maybe cause it changed to spot, but still that new spot color keeps the values of CMYK, is there any way to select that new created spot color with given CMYK values in the code? Thank you


