I don't see how.
I mean Lr does not allow low-level access to internet communications, and otherwise what you get is:
If you cant do it with those, then you cant do it, or at least not directly...
One thing you can do is talk to an external app. So what you could do is write the protocol handler as an external app, and then to send information from a plugin via the custom internet protocol, write a file or pass parameters to the external app. To receive, you could read a file written by the external app.
Thats about all I can think of at the moment.
Well maybe one other idea: use an http wrapper to access a web-app to tunnel, instead of a reglar app.
It's not documented in SDK, but I've tried it before.
URLHandler = "URLHandler.lua",
In URLHandler.lua (or whatever you want), just:
-- handle url here
BTW I also tried this for external app communication, but for that specific purpose it was not suitable, because Lightroom takes focus when URL is clicked from browser.
Just be sure that your code allows for the URL received being surrounded in
double quotes. Not exactly sure the circumstances/platforms that trigger
the issue but it is worth catering for it or you could end up with some
very hard to reproduce bugs being reported.
This seems to work fine on my Win XP system running Firefox as my system default browser. If I use IE 8, instead, I get an "Internet Explorer cannot display the webpage" diagnostic page when it gets handed my "lightroom://...." callback URL. Does this mechanism work with IE? Is it because IE wasn't my default browser when Lightroom was installed?
I am wondering if there is some security or privacy setting that is
stopping IE from responding to the callback? A quick way to check would be
to temporarily add the originating site to your trusted site zone to see if
it works then.
On Chrome you are prompted the first time to see whether you want to accept
URLs with this protocol. I'm guessing this is IE's way of handling the same
(Apologies for the brevity - sent from my Android)
The "lightroom://..." URL works fine in IE if I type it on the address bar, but it doesn't work (i.e. "Internet Explorer cannot display the webpage" error) if it comes in from the internet via an HTTP 302 redirect response. Per Matt's suggestion, I added the originating site to my "trusted sites" (and even threw in my "lightroom://..." URL for good mesasure), but still no joy. I guess Rob is having success driving his plug-in from IE, because his stuff is all local (right, Rob?).
So, I'm still curious if anyone has had success using IE to respond to the "lightroom://..." protocol (or any custom protocol, for that matter) when the request originated from the internet. Anyone?
(p.s., if anyone's curious, here's a page describing how custom protocols are registered on Windows systems: http://msdn.microsoft.com/en-us/library/aa767914%28v=vs.85%29.aspx . )
Update: Using IE, I discovered that if a user clicks on a link in a remote web page that has a "lightroom://..." URL, or the remote web page contains a
<META HTTP-EQUIV="refresh" CONTENT="0;URL=lightroom://... />
tag, it works. IE (8 -- haven't tested others) is only choking on the HTTP 302 redirect. :-(
Message was edited by: Don McKee. Added update.
Thanks for the link.
Yeah - I have had no problems in IE when clicking on links via internet supplied web pages, once Lightroom has been approved as the URL handling agent. Never tried a redirect.
I mean, lightroom:// links are neither local nor remote per se - or should I say they are always "local"...