• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Enthusiast ,
Dec 07, 2020 Dec 07, 2020

Copy link to clipboard

Copied

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?

TOPICS
Actions and scripting

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Dec 07, 2020 Dec 07, 2020

Copy link to clipboard

Copied

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 );

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 08, 2020 Dec 08, 2020

Copy link to clipboard

Copied

EDIT:

 

/* https://community.adobe.com/t5/photoshop/script-that-reopens-the-same-active-photo-in-the-acr/m-p/11577494?page=1 */
executeAction(stringIDToTypeID('Adobe Camera Raw Filter'), undefined, DialogModes.ALL);

 

(I'm not sure why the code didn't work yesterday, I have since rebooted and it is working again, or perhaps just user error).

 

_____________________

 

And these:

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 08, 2020 Dec 08, 2020

Copy link to clipboard

Copied

LATEST

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

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 08, 2020 Dec 08, 2020

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 08, 2020 Dec 08, 2020

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 08, 2020 Dec 08, 2020

Copy link to clipboard

Copied

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 errorimage.pngimage.png

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 08, 2020 Dec 08, 2020

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 08, 2020 Dec 08, 2020

Copy link to clipboard

Copied

If I try it from ESTK, the script keeps running til I click OK on ACR filter window. If I click cancel, script crashes.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 08, 2020 Dec 08, 2020

Copy link to clipboard

Copied

You can only go so far with testing from an IDE, sometimes you need to just run it in Photoshop to see how it "really works".

 

What happens in ESTK if you swap:

DialogModes.ALL

 

For:

DialogModes.NO

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 08, 2020 Dec 08, 2020

Copy link to clipboard

Copied

No changes.

Not surprised with Adobe's disinterest and lack of support.

 

My try is:

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

photoshop.executeScript(File('/E/byLFC_CameraRaw Filter.jsx'));

 

Where my File(/E/byLFC_CameraRaw Filter.jsx) is:

var idAdobeCameraRawFilter = stringIDToTypeID("Adobe Camera Raw Filter");
executeAction(idAdobeCameraRawFilter, undefined, DialogModes.NO);

 

No matter DialogModes is ALL or NO...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 08, 2020 Dec 08, 2020

Copy link to clipboard

Copied

Its likely Adobe forgot to add alert(stringIDToTypeID('Adobe Camera Raw Filter'));

JJMack_0-1607467531862.png number to the runMenuItem list.  Thers are errors in Photoshop scripting...

 

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 08, 2020 Dec 08, 2020

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 08, 2020 Dec 08, 2020

Copy link to clipboard

Copied

Yes, this is what I want.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines