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

Select and Merge Swatches via javascript

Contributor ,
Jul 03, 2016 Jul 03, 2016

Copy link to clipboard

Copied

Is there a way to: 1. Select swatches in swatch panel with JS 2. Use the Merge Swatches command with JS

TOPICS
Scripting

Views

883

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
Adobe
Guide ,
Jul 03, 2016 Jul 03, 2016

Copy link to clipboard

Copied

You can select using itemByName from swatch and for merge swatches the velow links are useful

merge selected swatches...

Re: Merging swatches

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
Contributor ,
Jul 04, 2016 Jul 04, 2016

Copy link to clipboard

Copied

There is no method itemByName in javascript , but there is a method getByName. This will return a swatch but does not select  in swatch panel.

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
Guide ,
Jul 04, 2016 Jul 04, 2016

Copy link to clipboard

Copied

You are right..Sorry..am new in Illustrator scripting.. in Indesign we used itemByName..

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
Explorer ,
Jul 11, 2016 Jul 11, 2016

Copy link to clipboard

Copied

Try app.activeDocument.layers.getByName ("layer name").selected=true;

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
Contributor ,
Jul 11, 2016 Jul 11, 2016

Copy link to clipboard

Copied

The code you write is for layers. Although it will not worked for layers as well but my requirement is to select the swatch from swatch panel of the Illustrator.

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 ,
Mar 29, 2023 Mar 29, 2023

Copy link to clipboard

Copied

LATEST

Hey Developer1009,

have you found a solution for merging the swatches? I'm looking for the same feature, but I cannot find any solution.

regards!

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