Copy link to clipboard
Copied
Hi.
I have created a script where upon opening a Photoshop scene, an icc profile will be copied to "C:\Program Files (x86)\Common Files\Adobe\Color\Profiles". This icc profile will then be applied through a snipped of code obtained from the Script Listener plugin. This snippet was acquired through running "View>Proof Setup>Custom...". My script will fail at the point where the profile is being applied, however it seems to work if the custom profile dialog is opened, closed and the script is run again. It seems like Photoshop needs to initialise newly copied icc profiles and this is happening when the dialog is opened, but I'm not entirely sure.
This is being run on Windows 7, Photoshop CS6 v13.0
To replicate:
function applyProfile(profile_name){
var idproofSetup = stringIDToTypeID( "proofSetup" );
var desc36 = new ActionDescriptor();
var idprofile = stringIDToTypeID( "profile" );
desc36.putString( idprofile, profile_name );
var idpreserve = stringIDToTypeID( "preserve" );
desc36.putBoolean( idpreserve, true );
executeAction( idproofSetup, desc36, DialogModes.NO );
}
If anyone has any insight into this, it would be greatly appreciated.
Thank you!
Copy link to clipboard
Copied
CS6 version 13.0 is very unstable it need its uodates installed on Windows your CS6 need to be version at 13.0.1.3 and ACR 9.1
Copy link to clipboard
Copied
Thank you, JJMack. I will update versions and retry.
Copy link to clipboard
Copied
I will update versions and retry.
By @yellowFattyBean
Will not help. The problem is old and there is no solution yet.
Refresh ICC Profile List during Runtime
Copy link to clipboard
Copied
Ahhh damn. This is a shame. I can't imagine there's a solution to this in sight either.
Thanks for the update. I will create a wrapper around photoshop when scenes are launched, profiles can be copied over before launching.
Thank you all.
Copy link to clipboard
Copied
Ahhh damn.
...
By @yellowFattyBean
Haha 🙂
And the solution is here !!!!
app.load(new File("C:\\Program Files\\Common Files\\Adobe\\Color\\Profiles\\Shadows+200.icc"))
var d = new ActionDescriptor();
d.putString(stringIDToTypeID("profile"), "Shadows+200");
d.putBoolean(stringIDToTypeID("preserve"), true);
executeAction(stringIDToTypeID("proofSetup"), d, DialogModes.NO);
upd.
p.s. the path is specified for x86 windows
Copy link to clipboard
Copied
Thanks for the reply, but ynfortunately this doesn't seem to work either. 😕
Copy link to clipboard
Copied
Thanks for the reply, but ynfortunately this doesn't seem to work either. 😕
By @yellowFattyBean
Yes, really, it does not work.
Now I double-checked it. Probably the last time I missed something when I checked it.
Sorry for the false hopes...
Copy link to clipboard
Copied
Should I move this thread to 'Bugs' to let this way employees know there's something to fix?
Copy link to clipboard
Copied
If possible, please.
This would be greatly helpful if this was fixed.
Thank you.
Copy link to clipboard
Copied
It's moved. Vote. You may provide also some clear report for engineers as answer to my post.
EDIT: someone moved this thread back to discussions area, WHY?
Copy link to clipboard
Copied
What is the exact problem you're trying to solve with this profile? What does it do that standard profiles don't? And why do you need to load it every time?
Copy link to clipboard
Copied
Probably the profile has to be loaded into that folder not while launching Photoshop but earlier.
Copy link to clipboard
Copied
Yes, I get that, but to me it sounds like he's chasing a red herring to fix a broken monitor profile. There might be a much simpler solution to this, but then we need to know what this profile is supposed to do.
Copy link to clipboard
Copied
Can you try { executeAction( idproofSetup, desc36, DialogModes.NO ); } catch(e) { executeAction( idproofSetup, desc36, DialogModes.ALL ); } And does it select your profile then? Maybe an alert before to tell the user to "just press the ok" button. I know this would not work in a 'no dialog' workflow but wonder if the workaround would even work.