Re: Launching an AIR application (captive runtime) from an http link

2020-05-18 Thread Javier Guerrero García
Hi Vincent:

All you have to do is make up an interesting name for the protocol part of
an URI scheme (for instance, "myapp://" or "batchfile://" or
"whatever://"), and just tell your operating system/browser how to open
URLS with that scheme (same as "you" did for "http://; schemes, "ftp://;
schemes, "mailto:; schemes, and so on).

For instance in a windows machine:

https://blog.xojo.com/2016/08/16/custom-uri-schemes-on-windows/
(ignore the Visual Basic gibberish, just take the concept)

Just enter the appropriate key under HKEY_CLASSES_ROOT and you're done.

For instance, I registered on my machine the "phantom://" protocol, to open
a phantomJS browser (in fact, phantomJS is called by a batch file with a
parameter as you see below). This are the contents of the .reg file to
register:

[HKEY_CLASSES_ROOT\phantom]
> @="URL:phantom Protocol"
> "URL Protocol"=""
> [HKEY_CLASSES_ROOT\phantom\shell]
> [HKEY_CLASSES_ROOT\phantom\shell\open]
> [HKEY_CLASSES_ROOT\phantom\shell\open\command]
> @="\"E:\\Documents\\misc\\phantomJS\\phantom.bat\" \"%1\""


That way, if I link to "phantom://thisfile.txt" on the intranet (for
instance), my browser (after some complaining the very first time) will
actually launch "E:\Documents\misc\phantomJS\phantom.bat thisfile.txt" on
this machine.

You can use any protocol name you want, as far as that name is not already
registered in HKEY_CLASSES_ROOT by any other app. Another handy one is
"pdfprint://", that could launch AcroReader.exe with the /p option for
direct printing a PDF form, etc...

Hope it helps :-) And yes, *don't forget to restart your browser after any
protocol registrations*, otherwise it would just ignore them and you will
just get crazy figuring it out.

P.S. Not tried, but apparently under certain circumstances you can also do
something similar directly from a webpage instead of fiddling with the
operating system:
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler


On Mon, May 18, 2020 at 12:07 PM After24  wrote:

> Hi Alex,
>
> No, I don't know how to launch other programs from an http link either.
> But since the original Adobe method imply to load a .swf file in order to
> launch an AIR application, this will no longer be available from January
> 21.
>
> Never mind, this is not an essential feature for us so I will not spend
> more
> time on that.
>
> Thank you for your time (and congrats for the 0.9.7 Royal release !)
>
> Vincent
>
>
>
> --
> Sent from: http://apache-flex-users.246.n4.nabble.com/
>


Re: Launching an AIR application (captive runtime) from an http link

2020-05-18 Thread Alex Harui
I'm pretty sure Zoom and other video chat apps are launching and installing 
from links.  Here's one SO post on the subject: 
https://stackoverflow.com/questions/14415012/how-to-launch-an-application-from-a-link-in-a-webpage-on-mac


On 5/18/20, 3:07 AM, "After24"  wrote:

Hi Alex,

No, I don't know how to launch other programs from an http link either.
But since the original Adobe method imply to load a .swf file in order to
launch an AIR application, this will no longer be available from January 21.

Never mind, this is not an essential feature for us so I will not spend more
time on that.

Thank you for your time (and congrats for the 0.9.7 Royal release !)

Vincent



--
Sent from: 
https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-flex-users.246.n4.nabble.com%2Fdata=02%7C01%7Caharui%40adobe.com%7C258c9899673d4441534a08d7fb133a64%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C637253932319960316sdata=EN%2BqSzigP%2BzrdbEHl%2FZSkN0rUvSvU5BXs%2FoGdVCad30%3Dreserved=0




Re: Launching an AIR application (captive runtime) from an http link

2020-05-18 Thread After24
Hi Alex,

No, I don't know how to launch other programs from an http link either.
But since the original Adobe method imply to load a .swf file in order to
launch an AIR application, this will no longer be available from January 21.

Never mind, this is not an essential feature for us so I will not spend more
time on that.

Thank you for your time (and congrats for the 0.9.7 Royal release !)

Vincent



--
Sent from: http://apache-flex-users.246.n4.nabble.com/