I need your help. I am new to write the javascript. I need to select the white text with overprint enabled (White means: C=0, M=0, Y=0, K=0).
I am writing the script but I don't it is not working properly. kindly highlight my error or advice me.
Reference script below:
#target illustrator-21
function fillColorOp(){
var doc = app.activeDocument;
var thisTf;
var thisTr;
doc.selection = null;
for(var i=0; i < doc.textFrames.length; i++)
{
thisTf = doc.textFrames[i];
for ( var j = 0; j < thisTf.textRanges.length; j++ )
{
thisTr = thisTf.textRanges[j];
if(thisTr.characterAttributes.Filled && (Math.round(thisTr.characterAttributes.fillColor.cyan) == 0) &&
(Math.round(thisTr.characterAttributes.fillColor.magenta) == 0) &&
(Math.round(thisTr.characterAttributes.fillColor.yellow) == 0) &&
(Math.round(thisTr.characterAttributes.fillColor.black) == 0) && (thisTr.characterAttributes.fillOverprint)
)
{
thisTr.selected = true;
};
};
};
};
fillColorOp();
Thanks in advance
Kalaimani.S