Skip to main content
yajiviki
Known Participant
January 11, 2023
Answered

How do we change the Camera Raw file Profile correction using Photoshop script?

  • January 11, 2023
  • 1 reply
  • 632 views

Hello Everyone!,

Is this possible to change the Camera Raw file Profile correction using Photoshop script?

Please find the screenshot for reference.

 

This topic has been closed for replies.
Correct answer jazz-y
var myFile = (new File()).openDlg();

var c2t = charIDToTypeID,
    s2t = stringIDToTypeID;

var d = new ActionDescriptor();
var params = new ActionDescriptor();

d.putPath(s2t("null"), myFile);
d.putBoolean(stringIDToTypeID('overrideOpen'), true);
params.putInteger(c2t("AuCA"), 1);
params.putDouble(c2t("LPEn"), 1);
params.putInteger(s2t("idLPSe"), 1);
d.putObject(s2t("as"), s2t("Adobe Camera Raw"), params);
executeAction(s2t("open"), d, DialogModes.ALL);

1 reply

jazz-yCorrect answer
Legend
January 11, 2023
var myFile = (new File()).openDlg();

var c2t = charIDToTypeID,
    s2t = stringIDToTypeID;

var d = new ActionDescriptor();
var params = new ActionDescriptor();

d.putPath(s2t("null"), myFile);
d.putBoolean(stringIDToTypeID('overrideOpen'), true);
params.putInteger(c2t("AuCA"), 1);
params.putDouble(c2t("LPEn"), 1);
params.putInteger(s2t("idLPSe"), 1);
d.putObject(s2t("as"), s2t("Adobe Camera Raw"), params);
executeAction(s2t("open"), d, DialogModes.ALL);
yajiviki
yajivikiAuthor
Known Participant
January 12, 2023

Thank you jazz-y,

I have updated the below line.

 

params.putInteger(s2t("idLPSe"), 1);

 

instead of 

 

params.putInteger(s2t("LPSe"), 1);

 

 

 

 

Legend
January 12, 2023

This line is not needed at all.

There is another problem here - without an explicit indication of the manufacturer, model and lens correction profile, it still does not turn on. When I tested this feature, the raw camera simply saved this setting for a particular shot and loaded it further, giving the illusion that everything was working. But it's not. Now on other files I can not get this option enabled 😞