Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

[JS CS4] findObjectPreferences.fillColor error

New Here ,
Feb 23, 2010 Feb 23, 2010

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.

TOPICS
Scripting
585
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 23, 2010 Feb 23, 2010

try:

app.findObjectPreferences.fillColor = doc.swatches.item("Really Nice

Yellow");

Harbs

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 23, 2010 Feb 23, 2010
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines