Open RAW file in ACR

Use this Forum for Beta-Testing your Photoshop Scripts

Moderators: Tom, Kukurykus

ucmego

Open RAW file in ACR

Post by ucmego »

Mike Hale wrote:No I don't think you can open even one file in ACR without the dialog. But if you skip the File.openDialog line the normal open dialog will appear that will let you select multiple files.

Code: Select allfunction OpenCameraRaw() {
  var keyNull = charIDToTypeID('null');
  var keyAs = charIDToTypeID('As  ');
  var adobeCameraRawID = stringIDToTypeID("Adobe Camera Raw");
  var desc = new ActionDescriptor();
  var overrideOpenID = stringIDToTypeID('overrideOpen');
  desc.putBoolean(overrideOpenID, true);
  var returnDesc = executeAction(charIDToTypeID('Opn '), desc, DialogModes.ALL);
  return (returnDesc.hasKey(keyAs) && returnDesc.hasKey(keyNull));
}


Hi,

Is this mean't to be a .js or .jsx file.

I'm new to this and would like to use it and understand what it can do.

BTW its great to see the forum updated haven't be to this forum for a while well done.

Cheers,
Mike Hale

Open RAW file in ACR

Post by Mike Hale »

OpenCameraRaw() is a function that will allow the user to select multi camera raw files to open in ACR. It is not a standalone script. It can be added to a script when that functionally is needed.
ucmego

Open RAW file in ACR

Post by ucmego »

Mike Hale wrote:OpenCameraRaw() is a function that will allow the user to select multi camera raw files to open in ACR. It is not a standalone script. It can be added to a script when that functionally is needed.

Can you confirm a couple of things:

Script doesn't work on its own.
Needs some other sdcript to call it up
Is this a .js or a .jsx script.

Thank you for your help.

Cheers,
Mike Hale

Open RAW file in ACR

Post by Mike Hale »

No it is not standalone. Yes, the function needs to be called in a script before it will do anything. It is written in ExtendScript(javascript) so you can save it as either .js or .jsx.

Below is the simplest script that uses the function.

Code: Select allOpenCameraRaw();
function OpenCameraRaw() {
  var keyNull = charIDToTypeID('null');
  var keyAs = charIDToTypeID('As  ');
  var adobeCameraRawID = stringIDToTypeID("Adobe Camera Raw");
  var desc = new ActionDescriptor();
  var overrideOpenID = stringIDToTypeID('overrideOpen');
  desc.putBoolean(overrideOpenID, true);
  var returnDesc = executeAction(charIDToTypeID('Opn '), desc, DialogModes.ALL);
  return (returnDesc.hasKey(keyAs) && returnDesc.hasKey(keyNull));
};