launch app from browser
Martin Baxter
mb.userev at harbourhosting.co.uk
Thu Jul 12 16:01:34 EDT 2007
Lars Brehmer wrote:
All I want to
> know is whether or not you can have a hyperlink or button in an html
> document (that resides on your hard drive) and is open in your browser
> and that launches another application which also resides on your hard
> drive, exactly the way clicking on a mailto link in your browser opens
> your mail app or clicking on a link to a H.264 video file launches
> Quicktime Player. Or just like clicking on a web link in a rev document
> launches your browser and internet connection or using "launch" in a rev
> script launches any app you want it to launch. In this case the app I
> want to lauch is a simple standalone created in Rev.
>
> Cheers,
>
> Lars
Lars,
The simple answer is that *if* it can be done, it will not be
straightforward.
The more detailed answer is...
Launching an application directly from html or script in a web page
without user confirmation is rightly considered a security risk, so
although you can easily make an html hyperlink like:
<a href="myapp.exe">click to launch myapp</a>
In your html. What results from that will depend on the browser in use
and perhaps the user's security preferences. Some browsers (e.g. IE6)
may show a dialog offering [Run] [Save to disk] [cancel], others such as
Firefox may not offer the [Run] option at all, but only [Save to disk],
which is no use to you.
As others have suggested, you might try launching a document that the
user's web browser already has an association for. That means, an
internal web-browser preference will have been set by the user
associating that document type with your app. So e.g. if the browser had
been told that files ending .rev should be opened using myapp.exe, then
the hyperlink <a href="stack.rev">run myapp</a> would launch myapp.exe
to handle the document stack.rev. This basically what is happening with
quicktime, email clients, acrobat and so-on, the browser has been
pre-configured to use specific software to handle those media types and
requests.
An all-browser, all platform solution for this will take some work, here
are some links I got from googling "launch exe from web page", relevant
for windows only, and mostly IE oriented, all are a rather technical or
cost money.
http://www.particlesoftware.com/en/index.html
http://www.whirlywiryweb.com/q/%2Flaunchinie.asp
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/hta/overview/htaoverview.asp
Mac I don't know.
Martin Baxter
More information about the use-livecode
mailing list