Skip to main content
lfcorullon13651490
Legend
December 8, 2020
Question

[SCRIPT] Any way to invoke Camera Raw filter to opened image

  • December 8, 2020
  • 5 replies
  • 2049 views

I tried the Script Listener but it's not working on my Win10 64 with Photoshop 2021.

I have a script to open InDesign selected image in Photoshop. 

Then I want to invoke Camera Raw filter. Is it possible?

This topic has been closed for replies.

5 replies

Chuck Uebele
Community Expert
Community Expert
December 8, 2020

Are you using a script within ID to send the image to PS? Once the image is placed within PS, you should be able to use one of the above  scripts to open the ACR filter within PS. If you're sending the file to PS via ID, you will have to use Bridge Talk to open the file in ACR, as ID doesn't use AM code, as car as I know.

lfcorullon13651490
Legend
December 8, 2020

Yes, this is what I want.

lfcorullon13651490
Legend
December 8, 2020

Thank you all.

All I want is open the Camera Raw Filter dialog directly when sending an image from InDesign to Photoshop.

var fpath = app.selection[0].graphics[0].itemLink.filePath;
photoshop.open(File(fpath));

But this looks not possible.

Thanks again.

JJMack
Community Expert
Community Expert
December 8, 2020

I do not install InDesign.  If that is an InDesign script. If it is an Indesigb script sending a File to Photoshop to open it would be Photoshop Plug-in ACR Open Dialog not the ACR filter dialog that foe filterinf Photoshop Layers. If Photoshop opens the file but not not through the ACR RAW File Dialog. And you pass  a Jpef or Tiff file and you have your ACR Plug-in preferences set toe open supported Jpeg abd Tiff file.  Try throwint the Image file to your system siif it Yout OS will start Photoshop necate the extension Jpeg and Tiff are associated with Photoshop.   Perhapse Photshop will then open the image file through ACR.  

 

I have been unable  to create a Photoshop script to Opme ACR as a filter. 

runMenuItem(stringIDToTypeID("Adobe Camera Raw Filter"));

generates an error

The scriptlistener Plug-in seems the generate a step before the menu Item step that seems to bet required.

Bute the command seems to be sone internal Photoshop thing histort state changed

 

/ =======================================================
historyStateChanged(1051, "Camera Raw Filter", true);
function historyStateChanged(ID, name2, hasEnglish) {
	var descriptor = new ActionDescriptor();

	descriptor.putInteger( stringIDToTypeID( "documentID" ), 1045 );
	descriptor.putInteger( stringIDToTypeID( "ID" ), ID );
	descriptor.putString( stringIDToTypeID( "name" ), name2 );
	descriptor.putBoolean( stringIDToTypeID( "hasEnglish" ), hasEnglish );
	executeAction( stringIDToTypeID( "historyStateChanged" ), descriptor, DialogModes.NO );
}

// =======================================================
AdobeCameraRawFilter(5, 184549376);
function AdobeCameraRawFilter(PrVN, PrVe) {
	var descriptor = new ActionDescriptor();

	descriptor.putInteger( charIDToTypeID( "PrVN" ), PrVN );
	descriptor.putInteger( charIDToTypeID( "PrVe" ), PrVe );
	executeAction( stringIDToTypeID( "Adobe Camera Raw Filter" ), descriptor, DialogModes.NO );
}

 

The code  Stephen A Marsh posted works

 
JJMack
Stephen Marsh
Community Expert
Community Expert
December 8, 2020

Hi JJMack, looks like Adobe has broken that single liner from Kukurykus... (Correction, the code works)

JJMack
Community Expert
Community Expert
December 8, 2020

ACR Filter would not open an image it would filters a layer filtering a smart object layer it would be a smart filter. If You use the  ACR Filter in an Script I would think it would be interactive Process when the script used runmenu  ACR Filter. ACR would open its Filter Dialog and the user that ran the script would need to use the filter Dialog to make any adjustment, The script would not be able to adjust the filter of have saved adjustments applied.

JJMack
Stephen Marsh
Community Expert
Community Expert
December 8, 2020
JJMack
Community Expert
Community Expert
December 8, 2020

executeAction(stringIDToTypeID('Adobe Camera Raw Filter'), undefined, DialogModes.ALL) Still works one my Windows Machine in Photpshop 22.1

JJMack
Chuck Uebele
Community Expert
Community Expert
December 8, 2020

This script from scriptListener opened a file in the Camera Raw filter. I had to change the dialog mode to "ALL" rather than "NO" for it to be able to be edited in Camera Raw.

 

var idAdobeCameraRawFilter = stringIDToTypeID( "Adobe Camera Raw Filter" );
    var desc18 = new ActionDescriptor();
    var idPrVN = charIDToTypeID( "PrVN" );
    desc18.putInteger( idPrVN, 5 );
    var idPrVe = charIDToTypeID( "PrVe" );
    desc18.putInteger( idPrVe, 184549376 );
executeAction( idAdobeCameraRawFilter, desc18, DialogModes.ALL );