Preferences Camera Raw

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

pierrelabbe

Preferences Camera Raw

Post by pierrelabbe »

Is it possible to script a set of preferences Camera Raw in Photoshop script?
ScriptingListener does not keep the settings specified in the Preferences dialog Photoshop> Camera Raw.

thx for the help.
Pierre

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

xbytor

Preferences Camera Raw

Post by xbytor »

Look at CameraRAWOpenOptions as a parameter to app.open(). There is some flexibility there.
pierrelabbe

Preferences Camera Raw

Post by pierrelabbe »

Thanks xbytor but I am beginner in scripting and I don't know how to Turning on TIFF Processing in ACR and how I can use CameraRAWOpenOptions
Mike Hale

Preferences Camera Raw

Post by Mike Hale »

You can script setting of the preference to open jpg and tif in ACR using CS3. However Adobe changed the preferences in CS4 so you can't set that in newer versions.

You can script opening a jpg or tif in the ACR dialog using the function below regardless of the preference settings.

Code: Select allfunction OpenCameraRaw(file) {// file object
   try{
      var desc = new ActionDescriptor();
      desc.putPath(charIDToTypeID('null'), File(file.toString()));
      // Suppress choose file dialog.
      var overrideOpenID = stringIDToTypeID('overrideOpen');
      desc.putBoolean(overrideOpenID, true );
      var desc1 = new ActionDescriptor();
      desc.putObject( charIDToTypeID( 'As  ' ), stringIDToTypeID( 'Adobe Camera Raw' ), desc1 );
      var returnDesc = executeAction(charIDToTypeID('Opn '), desc, DialogModes.ALL);
      return (returnDesc.hasKey(charIDToTypeID('As  ')) && returnDesc.hasKey(charIDToTypeID('null')));
   }catch(e){}
}

Or you can use the DOM
Code: Select allvar openOpts = new CameraRAWOpenOptions;
app.displayDialogs = DialogModes.ALL;
app.open(File('/c/1.jpeg'),openOpts);// will display the standard open dialog where you can select a jpg or tif to open in ACR
app.displayDialogs = DialogModes.ERROR;
pierrelabbe

Preferences Camera Raw

Post by pierrelabbe »

Thanks Mike,
With some changes I got the desired result (with CS5).
I still have a problem, I would like that the Camera Raw window provides default show "Open like smart object"