Copy link to clipboard
Copied
Hello,
I'm trying to find objects with a fill colour of "Really Nice Yellow", for example. "Really Nice Yellow" exists in the document. If I run this code:
app.findObjectPreferences.fillColor = "Really Nice Yellow"
And run the script, I get this error in the ESTK:
"Invalid value set for property 'fillColor'. Expected Swatch, String, or NothingEnum enumerator, but received "Really Nice Yellow".
I am clueless as to why it won't accept that string for a fill colour. A quick search on here suggests that JS findObjectPreferences have some issues with colours, but I can't pinpoint the exact problem.
Thanks in advance for any help you can offer.
Copy link to clipboard
Copied
try:
app.findObjectPreferences.fillColor = doc.swatches.item("Really Nice
Yellow");
Harbs
Copy link to clipboard
Copied
Its not working in CS4 on Mac. I have not idea about PC. I also face same problem in past.
See below link
http://forums.adobe.com/thread/568284
Shonky
Find more inspiration, events, and resources on the new Adobe Community
Explore Now