Skip to main content
Inspiring
December 20, 2021
Question

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

  • December 20, 2021
  • 1 reply
  • 1037 views

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!

 

 

This topic has been closed for replies.

1 reply

rob day
Community Expert
Community Expert
December 20, 2021

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

 

 

paross20Author
Inspiring
December 20, 2021

Hi Rob!

 

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

 

 

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

 

 

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

rob day
Community Expert
Community Expert
December 20, 2021

Does this work?:

 

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