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

Extendscript fails when applying profile to newly copied icc

Community Beginner ,
Oct 26, 2021 Oct 26, 2021

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:

  • Whilst running Photoshop, copy an icc profile into "C:\Program Files (x86)\Common Files\Adobe\Color\Profiles".
  • Use the function below, passing the copied profile name through it. This should fail.
  • Open "View>Proof Setup>Custom..." and close.
  • re-run the function.
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!

TOPICS
Actions and scripting , Windows

Views

726

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 ,
Oct 26, 2021 Oct 26, 2021

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

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
Community Beginner ,
Oct 27, 2021 Oct 27, 2021

Copy link to clipboard

Copied

Thank you, JJMack. I will update versions and retry.

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
People's Champ ,
Oct 27, 2021 Oct 27, 2021

Copy link to clipboard

Copied

quote

 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

 

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 ,
Oct 27, 2021 Oct 27, 2021

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.

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
People's Champ ,
Oct 27, 2021 Oct 27, 2021

Copy link to clipboard

Copied

quote

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

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 ,
Oct 29, 2021 Oct 29, 2021

Copy link to clipboard

Copied

Thanks for the reply, but ynfortunately this doesn't seem to work either. 😕

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
People's Champ ,
Oct 29, 2021 Oct 29, 2021

Copy link to clipboard

Copied

quote

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...

 

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 ,
Oct 30, 2021 Oct 30, 2021

Copy link to clipboard

Copied

Should I move this thread to 'Bugs' to let this way employees know there's something to fix?

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 ,
Oct 31, 2021 Oct 31, 2021

Copy link to clipboard

Copied

If possible, please.

 

This would be greatly helpful if this was fixed.

 

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
LEGEND ,
Nov 01, 2021 Nov 01, 2021

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?

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 ,
Oct 26, 2021 Oct 26, 2021

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?

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 ,
Oct 27, 2021 Oct 27, 2021

Copy link to clipboard

Copied

Probably the profile has to be loaded into that folder not while launching Photoshop but earlier.

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 ,
Oct 27, 2021 Oct 27, 2021

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.

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
Nov 01, 2021 Nov 01, 2021

Copy link to clipboard

Copied

LATEST

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.

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