Rainer M Krug wrote:
Hi

Is it possible to insert into a document (class: beamer) a hyperlink via URL which launches a program?

Thanks

Rainer


I can think of one way, but I don't know whether it generalizes beyond Windows (I suspect it works on Macs, not sure on Linux). Suppose that you have a data file whose extension is associated (either in the OS or within your default web browser) with a particular application. If you use file://path/to/target/myfile.ext in the hyperlink, clicking the hyperlink in the PDF file launches the web browser, which then asks you whether you want to open the target file or save it. You pick open and the application launches and opens the file.

If you want to launch an application without a target file, you can try the following. First, associate in Windows some extension with a shell processor. For instance, I have .sh associated with MinSYS sh.exe (which emulates sh on a *nix system). To launch app.exe from a Beamer presentation, I first write a script (app.sh) that launches app.exe. (The script will likely need an absolute path to app.exe, since at least with Firefox it will be launched from whatever Firefox thinks is your default download directory.) In the Beamer presentation, I use file://path/app.sh. When I click the link, Beamer invokes Firefox to process the link, Firefox asks me what do with the link (default being to run it under sh, since that's the association in Windows), I select the default, Firefox runs sh, which runs app.sh, which runs app.exe. <pause to catch breath>

Note that this is not particularly transportable.

HTH,
/Paul


Reply via email to