Page 1 of 2

Open RAW file in ACR

Posted: Fri Mar 19, 2010 7:37 pm
by rasoetan
Hello,

Is it possible to actually open a raw file in ACR itself? I know how to apply CR settings and how to set the options, but the file always opens in Photoshop. Can ACR be called to open a RAW file?

Thanks,
Raphael

Open RAW file in ACR

Posted: Fri Mar 19, 2010 8:14 pm
by Paul MR
Just open it as you would any other file but do not have this line!
app.displayDialogs = DialogModes.NO;
Else it will open in Photoshop.

Open RAW file in ACR

Posted: Fri Mar 19, 2010 9:07 pm
by rasoetan
Thanks for the reply, but app.open still bypasses ACR and goes straight to PS.

Open RAW file in ACR

Posted: Fri Mar 19, 2010 10:14 pm
by Paul MR
You are right! Please try this...
Code: Select allvar file = File.openDialog("Please select RAW file"); 
OpenCameraRaw( file );

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

Open RAW file in ACR

Posted: Fri Mar 19, 2010 10:26 pm
by rasoetan
Once AGAIN! THANK YOU!

Open RAW file in ACR

Posted: Sat Mar 20, 2010 3:51 am
by rasoetan
One more thing. Is there a way to load multiple files without opening a dialog window? ScriptListener generates the same code multiple times for each file loaded but when I try to duplicate the script listener, it only loads one of them at a time. I also tried the file object array used by PS to load multiple files, that did not seem to work either. I can't believe this is as complicated as is turning out to be.

Thanks,
Raphael

Open RAW file in ACR

Posted: Sat Mar 20, 2010 4:55 am
by Mike Hale
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));
}

Open RAW file in ACR

Posted: Sat Mar 20, 2010 5:20 am
by rasoetan
Thanks. Actually I was able to pass a file object to the OpenCameraRaw in your previous example without opening a dialog.

Thanks for all your input.
Raphael

Open RAW file in ACR

Posted: Fri Sep 10, 2010 4:17 am
by carolyny476
It really useful for me, thanks for the info that you guys have been discussing.

Open RAW file in ACR

Posted: Mon Sep 27, 2010 9:39 am
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,