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

How to suppress the color profile dialog (CC 2018)

New Here ,
Sep 02, 2018 Sep 02, 2018

Copy link to clipboard

Copied

Hi,

how do you suppress solely the color profile dialog  in a script (JavaScript) when opening a file, but not all dialogs?

TOPICS
Actions and scripting

Views

2.0K

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

correct answers 1 Correct answer

Advocate , Sep 02, 2018 Sep 02, 2018

black_square  ha scritto

Yes, I mean the dialog appearing when the embedded profile does not match the working color space and I want to suppress it by some code, not the settings.

these are the codes

// Disable color profile

var desc6 = new ActionDescriptor();

var desc7 = new ActionDescriptor();

var ref1 = new ActionReference();

ref1.putProperty( charIDToTypeID( "Prpr" ), stringIDToTypeID( "colorSettings" ));

ref1.putEnumerated( charIDToTypeID( "capp" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt"

...

Votes

Translate

Translate
Adobe
LEGEND ,
Sep 02, 2018 Sep 02, 2018

Copy link to clipboard

Copied

How do you choose that manualy? Where normally is it? Not all dialogs like without: displayDialogs = DialogModes.NO

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
Advocate ,
Sep 02, 2018 Sep 02, 2018

Copy link to clipboard

Copied

Do you understand the "color profile dialog" to be the dialog appearing when the embedded profile does not match the working color space?

If so, the easiest, IMHO, would be creating custom Color Settings where the options to ask when no or not matching profiles are with the picture are unchecked, and use those settings.

If not, could you explain what exactly you are referring to?

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
Advocate ,
Sep 02, 2018 Sep 02, 2018

Copy link to clipboard

Copied

Desable this checkbox

Color Settings 2018-09-02 13-16-14.jpg

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 ,
Sep 02, 2018 Sep 02, 2018

Copy link to clipboard

Copied

Yes, I mean the dialog appearing when the embedded profile does not match the working color space and I want to suppress it by some code, not the settings.

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
Advocate ,
Sep 02, 2018 Sep 02, 2018

Copy link to clipboard

Copied

OK, in this case, we can assemble the response…

The Color Settings are accessed via menu Edit --> Color Settings… (Cmd-Shift-K / Ctrl-Shift-K).

The checkboxes to deactivate are shown in geppettol66959005​'s message.

It is recommended to save these settings under its own name, so that it is easy to switch (there are many cases where it is important to know that there are issues with the profiles.

Besides loading the settings using code, I don't see just so a way to deal with specifically that dialog, because it opens automatically, but you might try the displayDialogs = DialogModes.NO statement. It may or may not work as intended.

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 ,
Mar 17, 2022 Mar 17, 2022

Copy link to clipboard

Copied

THANK YOU!!!!!!!!!   

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
Advocate ,
Sep 02, 2018 Sep 02, 2018

Copy link to clipboard

Copied

black_square  ha scritto

Yes, I mean the dialog appearing when the embedded profile does not match the working color space and I want to suppress it by some code, not the settings.

these are the codes

// Disable color profile

var desc6 = new ActionDescriptor();

var desc7 = new ActionDescriptor();

var ref1 = new ActionReference();

ref1.putProperty( charIDToTypeID( "Prpr" ), stringIDToTypeID( "colorSettings" ));

ref1.putEnumerated( charIDToTypeID( "capp" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ));

desc6.putReference( charIDToTypeID( "null" ), ref1 );

desc7.putBoolean( stringIDToTypeID( "askMismatchOpening" ), false );

desc7.putBoolean( stringIDToTypeID( "askMismatchPasting" ), false );

desc7.putBoolean( stringIDToTypeID( "askMissing" ), false );

desc6.putObject( charIDToTypeID( "T   " ), stringIDToTypeID( "colorSettings" ), desc7 );

executeAction( charIDToTypeID( "setd" ), desc6, DialogModes.NO );

// Enable color profile

var desc6 = new ActionDescriptor();

var desc7 = new ActionDescriptor();

var ref1 = new ActionReference();

ref1.putProperty( charIDToTypeID( "Prpr" ), stringIDToTypeID( "colorSettings" ));

ref1.putEnumerated( charIDToTypeID( "capp" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ));

desc6.putReference( charIDToTypeID( "null" ), ref1 );

desc7.putBoolean( stringIDToTypeID( "askMismatchOpening" ), true );

desc7.putBoolean( stringIDToTypeID( "askMismatchPasting" ), true );

desc7.putBoolean( stringIDToTypeID( "askMissing" ), true );

desc6.putObject( charIDToTypeID( "T   " ), stringIDToTypeID( "colorSettings" ), desc7 );

executeAction( charIDToTypeID( "setd" ), desc6, DialogModes.NO );

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
Advocate ,
Oct 13, 2023 Oct 13, 2023

Copy link to clipboard

Copied

LATEST

That is nice, but if someone doesnt have this activated, it will activate now. Wish we could check settings like we can in illustrator app script

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 ,
Sep 02, 2018 Sep 02, 2018

Copy link to clipboard

Copied

Geppetto's code works perfectly for me. Thanks everybody.

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
LEGEND ,
Sep 02, 2018 Sep 02, 2018

Copy link to clipboard

Copied

Honestly I was sure you ask about something else as it was too obvious. I mean you can get it from Script Listener. But it seems first guess was right 🙂


Anyway here is also other version of the same code geppettol66959005 posted:

 

function sTT(v) {return stringIDToTypeID(v)} (function(v1, v2, v3) {

    (ref = new ActionReference()).putProperty(sTT('property'), sTT('colorSettings'))

    ref.putClass(sTT('application')); (dsc1 = new ActionDescriptor()).putReference(sTT('null'), ref)

    dsc2 = new ActionDescriptor(); for(i = 0; i < (arr = ['Opening', 'Pasting', '']).length; i++) {

          dsc2.putBoolean(sTT('askMis' + (i < 2 ? 'match' : 'sing') + arr[i]), arguments[i])

    }

    dsc1.putObject(sTT('to'), sTT('colorSettings'), dsc2), executeAction(sTT('set'), dsc1)

})(false, false, false)

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