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

Trying to find script language to replace swatches in InDesign

New Here ,
Jan 16, 2019 Jan 16, 2019

I'm trying to write a script that will allow me to replace one of my swatches for a Pantone swatch, i need to replace about 5 swatches with 5 different Pantone swatches, i'd like to be able to run this script when I'm in old documents. Anyone able to help?

TOPICS
Scripting
837
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
Community Beginner ,
Jan 16, 2019 Jan 16, 2019

Hi,

share your code.

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
New Here ,
Jan 17, 2019 Jan 17, 2019

I'm looking for code to write the script

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
New Here ,
Jan 17, 2019 Jan 17, 2019

I have old swatches in my panel and I have the new swatches in my panel. I'd like to get code that will replace swatch A with swatch B, or if there is language that will convert swatch A to a specific Pantone that would be great.

example:

replace swatch GRAY 44 with PANTONE 423

replace swatch GRAY 77 with PANTONE 425

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
Explorer ,
Jan 17, 2019 Jan 17, 2019
LATEST

The names in quotes must match what is in your swatch palette

var myDocument = app.activeDocument;

             myDocument.colors.item("GRAY 44").remove("PANTONE 423");

             myDocument.colors.item("GRAY 77").remove("PANTONE 425");

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
Community Expert ,
Jan 17, 2019 Jan 17, 2019

What is the criteria to replace the swatch? How to identify which Pantone Swatch to use for replacement

-Manan

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