Illustrator script to get compoundPathItem/PathItem filled colors on few layers
I want get each Items filled colors code on each layers. I tried these codes with no success
Please help me.
var doc = app.activeDocument;
for (i=0; i<doc.layers.length; i++) {
var pathcolor = doc.layers[i].pathItems[0].color;
//this line returned Error 1302: No such element
var pathcolor = doc.layers[i].pathItems[0].fillcolor;
//this line returned Error 1302: No such element
var compoundpathcolor = doc.layers[i].compoundPathItems[0].color;
//this line returned Error 21: undefined
var compoundpathcolor = doc.layers[i].compoundPathItems[0].fillcolor;
//this line returned Error 21: undefined
}
