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!
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?
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Does this work?:
app.displayDialogs = DialogModes.ERROR;
app.open( File( "~/Desktop/test.psd" ) );
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!!
Copy link to clipboard
Copied
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