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

Replace Duplicate (numbered) Swatches in InDesign

New Here ,
Jun 12, 2017 Jun 12, 2017

Copy link to clipboard

Copied

Has anyone seen/made a script that will remove the duplicate swatches in InDesign? I found one that will get rid of “copies” but not that will remove the ones with the auto-numbered filenames (ex. Color, Color 1, Color 2 etc.). Basically I need a script that can clean up a file after people are done working with pulling from a variety of sources.

These are the final swatches I want left in the folder and how they are named in our files:

Primary_Red RGB (186)

Primary_Gray RGB (425)

Primary_Blue RGB (7459)

These are the duplicates we often end up with in the file:

Primary_Red RGB (186) 2

Primary_Gray RGB (425) 2

Primary_Blue RGB (7459) 2

Primary_Red RGB (186) 3

Primary_Gray RGB (425) 3

Primary_Blue RGB (7459) 3

Any assistance would be amazing!

Thank you

TOPICS
Scripting

Views

540

Translate

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
Community Expert ,
Jun 12, 2017 Jun 12, 2017

Copy link to clipboard

Copied

That doesn't sound too daunting. Either you go by the names, and remove all that have a Same Name + space + a digit, or, if you don't trust this to be correct, literally compare the RGB or CMYK values of each entry to every other entry (where you then could perhaps delete the one with the longest name).

Votes

Translate

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
New Here ,
Jun 13, 2017 Jun 13, 2017

Copy link to clipboard

Copied

LATEST

But how do you do this as a script? We have 21 colors in our palette and 21 times sometimes 3 duplicates is a bit much to do manually. Especially for users that are not too good in InDesign.

Votes

Translate

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