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

[Q] Is there way to get Lightroom PID from plugin

Contributor ,
Feb 12, 2018 Feb 12, 2018

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

TOPICS
SDK

Views

1.1K

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

correct answers 1 Correct answer

LEGEND , Feb 12, 2018 Feb 12, 2018

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.

Votes

Translate

Translate
LEGEND ,
Feb 12, 2018 Feb 12, 2018

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.

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
Contributor ,
Feb 13, 2018 Feb 13, 2018

Copy link to clipboard

Copied

johnrellis​​

Thank you very much for the input.

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
New Here ,
Feb 13, 2018 Feb 13, 2018

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  .

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
Contributor ,
Feb 13, 2018 Feb 13, 2018

Copy link to clipboard

Copied

LATEST

@roryj69814282,

Thank you very much for the link and MIDI2LR app.

I'm using with X-Touch Mini

Thank you,

Naoki

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