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

Convert RGB to CMYK in illustrator script

Community Beginner ,
Nov 11, 2021 Nov 11, 2021

Copy link to clipboard

Copied

In illustrator scripting how to change color mode RGB to CMYK expect:

 

I used the below code, its running for active document. when i run the bacth .eps file. The below code is not working.

app.executeMenuCommand("doc-color-cmyk"); 

 

best answer much appreciated.

 

 

 

TOPICS
Scripting

Views

1.5K

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
Participant ,
Nov 11, 2021 Nov 11, 2021

Copy link to clipboard

Copied

This code works fine to me

I hope works for you too

var doc=app.activeDocument;
if (doc.documentColorSpace == "DocumentColorSpace.RGB") {
           app.executeMenuCommand('doc-color-cmyk');
         alert("Changed to CMYK");
    };

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
Community Beginner ,
Nov 11, 2021 Nov 11, 2021

Copy link to clipboard

Copied

Hi Gersson

                         Thank you for your replay.I tried this one but this is not work perfectly.when run in illustrator script panel.

if any other way pls suggest.

 

thanks

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
Participant ,
Nov 11, 2021 Nov 11, 2021

Copy link to clipboard

Copied

could you please provide the file you need to change to CMYK space

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
Community Beginner ,
Nov 14, 2021 Nov 14, 2021

Copy link to clipboard

Copied

Hi Gersson,

File not possible to upload.

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
Community Expert ,
Nov 11, 2021 Nov 11, 2021

Copy link to clipboard

Copied

Hi,

Could you please share your code so that we can look how you are using the above statement.

Best 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
Community Beginner ,
Nov 14, 2021 Nov 14, 2021

Copy link to clipboard

Copied

Hi charu, 

                 Thanks for your replay.pls find below code.

app.executeMenuCommand("selectall");
app.executeMenuCommand("Colors7");
app.executeMenuCommand('doc-color-cmyk');

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
Community Expert ,
Nov 21, 2021 Nov 21, 2021

Copy link to clipboard

Copied

LATEST

Hi @dhandapani_p 

The code that you shared is running perfectly fine, but as you mentioned you run in the batch, we would like to see complete code. If we just talk amount single command it is working fine. If possible please share your all steps of batch process and some example eps file. You can upload those sample files and share the link with us.

Best 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