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

Script To Open PSD File With Color Setting Profile Mismatch Dialog ( Ask When Opening )

Community Beginner ,
Dec 20, 2021 Dec 20, 2021

Copy link to clipboard

Copied

Hello,

 

I noticed when I script opening a PSD File using code such as:

 

app.open( File( exampleFile ) );

 

It does not ask before it opens whether I want to convert the color profile to the working space, even though I have the 'Ask When Opening' checked on missing or mismatching profiles in the Color Settings. I only have this issue when trying to script opening PSD files, with other file types I do get the dialog pop-up. I also get a proper dialog with PSD files if I just do a manual 'File > Open' instead of opening via script. I tried putting this line:

 

app.displayDialogs = DialogModes.ALL;

 

However this gives me the unwanted dialog window of having to select the file I want to open, when I've already specified which file I wish to open in the script itself.

 

Any thoughts?

 

Thanks!

 

 

TOPICS
Actions and scripting , Windows

Views

763

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 Expert ,
Dec 20, 2021 Dec 20, 2021

Copy link to clipboard

Copied

Hi @paross20 , It‘s working for me when the opening file has a conflicting profile assignment. Are you sure there is actually a conflict?

 

Screen Shot 20.png

 

Screen Shot 19.png

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 ,
Dec 20, 2021 Dec 20, 2021

Copy link to clipboard

Copied

Hi Rob!

 

Thanks for the reply. Yes, it appears to be in conflict. Here are my color settings, 

 

color_settings.jpg

 

And when I simply do a 'File > Open' Operation on my test.psd file, I get this: 

 

color_mismatch_dialog.jpg

 

However, if I use the same line of code you're using, it does not give me this dialog window. It will just default to doing whatever I have chosen in the 'Color Management Policies' (ie- 'Convert to Working RGB' or 'Preserve Embedded Profiles'). I'm wondering if this is a discrepancy due to Photoshop versions? I'm using the latest 23.1 Release, and I see Adobe Photoshop 2020 in one of your screenshots?

 

Best,

Patrick

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 ,
Dec 20, 2021 Dec 20, 2021

Copy link to clipboard

Copied

Does this work?:

 

app.displayDialogs = DialogModes.ERROR;
app.open( File( "~/Desktop/test.psd" ) );

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 ,
Dec 20, 2021 Dec 20, 2021

Copy link to clipboard

Copied

Ahhh it's my fault!  My script was getting pretty long, and I see in one of my functions I have the flag 'DialogModes.NO'

 

Example line:

executeAction( idcollapseAllGroupsEvent, desc46, DialogModes.NO ); 

 

I just needed to reset it just before running the open command, and indeed 

app.displayDialogs = DialogModes.ERROR;

works great!

 

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
Community Expert ,
Dec 20, 2021 Dec 20, 2021

Copy link to clipboard

Copied

LATEST

 

 

app.displayDialogs = DialogModes.ERROR;

 

 

Works for Me I get the popup dialogs,

 

However, I use

 

 

app.displayDialogs = DialogModes.NO;

 

 

In my scripts  I do not get any popup dialogs and the image seem to get converted into the current document profile.  The layer the are created seen toe have good color.  When the File open or pasted in or placed in have ProPhoto RGB profiles where I'm creating sRGB output files.  No popup for RAW files, PSD files, for Jpg files, for Png files, colors seen good toe me however I'm a little bit colorblind.

Still my colored world is beautiful. And pop up dialogs  turn Batch processes into interactive processes

 

 

JJMack

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