1. .colorValue is a property of Color (Swatch),
2. its value is an array,
3. to compare these values use .join() method to convert an array to a string,
so use it like this:
var mydoc = app.activeDocument;
var myPItems = mydoc.pageItems.everyItem().getElements();
for (i=0; i<myPItems.length; i++)
myPItem = myPItems[i];
if (myPItem.fillColor.colorValue.join() == "100,50,0,0")
alert ("document has old color value");
thanks for the reply..
it tried for with strokeColor of the same value and with fill colour at a same time... but nothing happens, only when the fillColor or strokeColor is defined seperately, it works...
thats Y, i tried for only myPitem.colourValue..... where it should throw alert for, all the fill/stroke/text colour which has 100,50,0,0..
any help on this...
in rajnikids first mail... the script is particular to find fillcolor.colorValue... but i have a question....
if the document has the colorValue 100,50,0,0 for..... it can be a Textcolor or box Fillcolor or a stroke color.....
how? can we simply declare just the colorValue and get the alert...
alert ("the doc has 100,50,0,0")..
To do it simply delete unused colors in document and the list of Colors in panel "Swatches" could be read alike this alert.
I just added to the rajnikids request.
I m trying to find the, text/stroke/fills with the specific colour value and then alert. my request is not about deleting unused swatches...
many apologise, if my posting has wrong request or my posting is unclear. sorry jump_over...