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

cs4 set color of text frame does not work

Engaged ,
Jan 16, 2023 Jan 16, 2023

Copy link to clipboard

Copied

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

Views

380
Translate

Report

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

Copy link to clipboard

Copied

Is the selection a text frame?

Votes

Translate

Report

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

Copy link to clipboard

Copied

yes, it's a text frame

Votes

Translate

Report

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

Copy link to clipboard

Copied

Try

selection[0].textRange.fillColor = color;

 

Votes

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Report

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