Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


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

111

Likes

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

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");
    };

Likes

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

Likes

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

Likes

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.

Likes

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 Community Professional ,
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

Likes

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');

Likes

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 Community Professional ,
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

Likes

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