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
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.
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.
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)
Copy link to clipboard
Copied
Maybe this works for future visitors on this topic: https://lrcopytoclipboard.com/