Copy link to clipboard
Copied
Hi all,
Short question:
As I researched on API doc, it seems not available.
# I might overseen.
But is there way to get Lightroom PID from Lightroom plugin?
I think some Lua add-on enable to access, but it seems not able to do in Lightroom.
The PID I meant was application's Process ID.
It shows on Activity Monitor on Mac and Task Manager on Windows.
====
Detail question: (I'm looking for alternative as well)
Current code is using 2 socket ports to communicate other app on local.
It is working fine as single user.
But if multiple users are logon the system, use Lightroom and other app and switch user,
it cause issue. The issue is other app connect to different user's Lightroom.
Current code is hard coded socket port number. This needs to be retry different port number.
But I think I still need the PID to differentiate with other user's Lightroom instance.
====
Thank you,
Naoki
There isn't any function in the SDK API that returns the PID, unfortunately. You could run a shell script with LrTasks.execute() that gets the PID and writes it to a file.
With regard to the port numbers, the plugin could pass the port numbers to use on the command line to the external app.
Copy link to clipboard
Copied
There isn't any function in the SDK API that returns the PID, unfortunately. You could run a shell script with LrTasks.execute() that gets the PID and writes it to a file.
With regard to the port numbers, the plugin could pass the port numbers to use on the command line to the external app.
Copy link to clipboard
Copied
Thank you very much for the input.
Copy link to clipboard
Copied
The plugin could look up the PID. That's how I solved it in my app. See MIDI2LR/SendKeys.cpp at master · rsjaffe/MIDI2LR · GitHub .
Copy link to clipboard
Copied
@roryj69814282,
Thank you very much for the link and MIDI2LR app.
I'm using with X-Touch Mini
Thank you,
Naoki