Bob Hunter schrieb:

> I know this is a little off topic, but I haven't been able to get any help
> over in the Javascript group.  And, I know that the best programmers are
> over here anyway.
>
>
>
> I have a svg where the user clicks on an svg object which is supposed to
> launch a .mp4 app to show a mp4 video.  The method of doing this is an
> external javascript  that uses window.open(url_to_mp4_file).  I currently
> use that with mpgs with no problem.  But, I have a job with a guy that
> developed a proprietary mp4 viewer.  The viewer doesn't register 
> itself when
> installed.  So, my javascript statement doesn't work.
>
>
>
> I tried to "right-click a mp4 file, get the properties, change the app 
> that
> opens a mp4 file and set it to the new viewer.  That made it so I could
> double-click on any of the mp4 files and the viewer would open and 
> show the
> file.  But, when I did a windows.open(url_of_mp4_file), it still won't 
> start
> the mp4 viewer (a window opens, but it doesn't automatically launch the
> player). 
>
>
>
> This application does not use a web server (it runs locally on a 
> computer in
> Internet Explorer/ASV, Windows XP).
>
>
>
> I also tried adding shell --> open --> command with "c:\Program
> Files\myPlayer\mp4Player.exe" "%1" under the .mp4 entry in the registry
> HKEY_CLASSES_ROOT, but that wasn't enough to get it to work.
>
>
>
> If the player is c:\Program Files\myPlayer\mp4Player.exe, does anyone know
> what registry entries are required for Internet Explorer to launch the
> viewer when I give it the local hard drive url of an mp4 file?
>
>
>
> Thanks in advance for your help,
>
>
>
> Bob Hunter
>
Hi Bob

you could use the windows scripting hosts shell object to run any 
executable from html.
though there will be a popup asking for permission.
what you need is something like this:

var WshShell = new ActiveXObject("WScript.Shell");
        var oExec = WshShell.Exec("your.exe");

here is a complete example:
runexe.html

<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml";  >
  <head>
    <script>
      function runExe(){
        var WshShell = new ActiveXObject("WScript.Shell");
        var oExec = WshShell.Exec("calc");
     }
    </script>
  </head>
  <body >
    <embed src="test.svg" type="image/svg+xml" width="100%" height="500"/>
  </body>
</html>

test.svg

<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg";
 xmlns:xlink="http://www.w3.org/1999/xlink"; viewBox="0 0 1024 768" >
<rect x="0" y="0" width="100" height="100" onclick="top.runExe()"/>
</svg>

NOTE ! that this will only work in IE+ASV3/6

hth
Holger


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hv8tpc2/M=362329.6886308.7839368.1510227/D=groups/S=1706030389:TM/Y=YAHOO/EXP=1123327588/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to