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
Preferences Camera Raw
Preferences Camera Raw
Look at CameraRAWOpenOptions as a parameter to app.open(). There is some flexibility there.
Preferences Camera Raw
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
Preferences Camera Raw
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;
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;
Preferences Camera Raw
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"
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"