Script to change fillColor in object appearance attributes
Hi,
I have a series of text objects that have special appearances applied to them (outline stroke, ellipse and fill) in order to make them look like numbers within colored circles. There is another series of paths that have matching names. I wrote a script to iterate over each number and make it take the fillColor of the corresponding path, but can't seem to change the fillColor attribute within the appearance panel.
Here is the relevant snippet of code:
for (var n = 0; n < doc.layers["lines"].layers["numbers"].pageItems.length; n++) {
var obj = doc.layers["lines"].layers["numbers"].pageItems[n];
var id = Number(obj.contents);
newCol = findCol(id);
if (newCol != null) {
obj.fillColor = newCol;
} else {
alert("Found nothing for id " + id);
}
}And here is the relevant part of the file showing the object structure:

I know the API allows only very limited access to appearance attributes, but was hoping fillColor would be basic enough to be able to be accessed.
Thanks in advance for any help!
