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

copy to clipboard

Community Beginner ,
Feb 07, 2017 Feb 07, 2017

Copy link to clipboard

Copied

Hi community,

I'm working on a publish service and I'd like to use the goToPublishCollection menu (on the right click of a publish collection) to copy the remote URL into the clipboard.
I still didn't find any solution to do that. Neither in the SDK or in the usual LUA documentation...

Would you have any ideas? Is that possible with Lightroom_sdk?


Thnk you!
Cheers
Martin

TOPICS
SDK

Views

488

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 07, 2017 Feb 07, 2017

You can't do this directly with the SDK. But your plugin could use LrTasks.execute() to invoke a command-line utility that will set the contents of the clipboard.  A quick Google suggests "pbcopy" on Mac and "clip.exe" on Windows.

Votes

Translate

Translate
LEGEND ,
Feb 07, 2017 Feb 07, 2017

Copy link to clipboard

Copied

You can't do this directly with the SDK. But your plugin could use LrTasks.execute() to invoke a command-line utility that will set the contents of the clipboard.  A quick Google suggests "pbcopy" on Mac and "clip.exe" on Windows.

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 Beginner ,
Feb 07, 2017 Feb 07, 2017

Copy link to clipboard

Copied

It is working!! Thank you Jogn!
I don't think about LrTasks enough 🙂

Here is the solution in case somebody else want.

local copyCmd = "echo '"..info.remoteUrl.."' | pbcopy"

if prefs.os == "Windows" then

      copyCmd = "Echo "..info.remoteUrl.." | clip"

end

      LrTasks.execute(copyCmd)

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 ,
Mar 14, 2023 Mar 14, 2023

Copy link to clipboard

Copied

LATEST

Maybe this works for future visitors on this topic: https://lrcopytoclipboard.com/

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