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

cs4 set color of text frame does not work

Engaged ,
Jan 16, 2023 Jan 16, 2023

I need to set registration color to selection and the following doesn't work

 

 

var colour = app.activeDocument.swatches['[registration]'].color;
selection[0].contents.fillColor = colour;

 

 

using `selection[0].fillColor` doesn't work also

TOPICS
Scripting
589
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

correct answers 1 Correct answer

Guide , Jan 16, 2023 Jan 16, 2023

Try

selection[0].textRange.fillColor = color;

 

Translate
Adobe
Guide ,
Jan 16, 2023 Jan 16, 2023

Is the selection a text frame?

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 ,
Jan 16, 2023 Jan 16, 2023

yes, it's a text frame

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
Guide ,
Jan 16, 2023 Jan 16, 2023

Try

selection[0].textRange.fillColor = color;

 

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 ,
Jan 16, 2023 Jan 16, 2023
LATEST

i used `textRange.characterAttributes.fillColor` based on your other answer and it works

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