I'm curious if anyone has tried handling communication between Lr and Ps. I've never done anything in lua (which is what Lr uses according to the SDK) and before I start down the rabbit hole (if I even need to) I have some conceptual questions.
For automation to work, three things have to be true:
1. Ps must be able to detect when the file it's receiving is coming from Lr,
2. Ps must be able to run an action when a file from Lr is received, and
3. Ps must be able to send the file back to Lr.
If #1 is possible, then it follows that whatever script does this detection can also call the action in question. So #2 is handled.
And Lr detects that Ps has saved the file and reloads it automatically, more or less, which handles #3.
So the entire operation hinges on #1. Can anyone think of how it can be detected if Lr has sent the file to Ps?
There would have to be some smarts built into this because when the file is opened in Ps, Ps would have to know to run a script and would have to know to *only* run the script if it came from Lr and not just File, Open or whatever.
For example, I can detect files sent from bridge using this code
Code: Select allif (app.playbackParameters.hasKey(app.stringIDToTypeID('filesList'))) { ...}
Any help is greatly appreciated.
Scripting the Ps <--> Lr exchange
Scripting the Ps <--> Lr exchange
Checkout photoshop.jsx (I forget where it's located). There are functions in there for Lr integration that may help you out.
Scripting the Ps <--> Lr exchange
In Windows for PS CC 2014 the photoshop.jsx file is at: C:\Program Files (x86)\Common Files\Adobe\Startup Scripts CC\Adobe Photoshop.
I've modified that file to integrate Bridge with PS, so I can start a PS script with selected files in Bridge. I haven't tried it with LR. There are some global variables you can use to detect if files are opened from Bridge or LR. That file consist of a bunch of functions that make the different scripts work with each other, so you just need to create new functions, using the ones there as a base.
I've modified that file to integrate Bridge with PS, so I can start a PS script with selected files in Bridge. I haven't tried it with LR. There are some global variables you can use to detect if files are opened from Bridge or LR. That file consist of a bunch of functions that make the different scripts work with each other, so you just need to create new functions, using the ones there as a base.
Scripting the Ps <--> Lr exchange
Thanks guys. I found it in
/Library/Application Support/Adobe/Startup Scripts CC/Adobe Photoshop/photoshop.jsx
/Library/Application Support/Adobe/Startup Scripts CC/Adobe Photoshop/photoshop.jsx