0

I have a script that does a variety of things to the active document on file open in Photoshop (currently on v 23.x - I keep it relatively up to date so that'll change over time)

I run this from the File > Scripts > Script Events Manager: "Open Document" event.

Unfortunately when opening multiple RAW files via ACR (Adobe Camera RAW), it seems the "Open" event is only fired once, after they have all been opened - or more accurately, it appears that the "Open" event may be firing once for each RAW opened, but the activeDocument is always the same most recently opened RAW file - it does not cycle through each file.

This means that my script only runs on one of the opened RAW files (the currently active one). I'm aware that I can do a loops through opened documents etc., but my question is:

  1. Is there a script action / script ID that is fired for each file that is opened via ACR that I can use instead of the "Open Document" event?
  2. Alternatively, is there any way to get a list of the files that were opened in a specific call from ACR? That is, if I already have 2 documents open in Photoshop, and I open another 2 via ACR, can I get a list of just that 2 (as opposed to having to loop through every open document)?
Ned Martin
  • 494
  • 6
  • 12
  • 1
    You can use for (var i = 0; i < documents.length; i++){alert(documents[i].name);} to get the open documents. Which is probably you best option, as using the Script Event Manager is just painful. – Ghoul Fool Feb 24 '22 at 09:18
  • @GhoulFool that's what I'm doing currently, but it feels inefficient, loops through existing open documents when I open a new one, and causes the document to change, which seems slow. Perhaps it's the best way there is. – Ned Martin Feb 25 '22 at 14:39
  • 1
    The real place to ask is on the [Photoshop Ecosystem.](https://community.adobe.com/t5/photoshop-ecosystem/ct-p/ct-photoshop?page=1&sort=latest_replies&lang=all&tabid=all) V. wise people who might be able to help. – Ghoul Fool Feb 25 '22 at 17:32

0 Answers0