You are here: Re: How to launch programs on my hard disk when URLs are clicked? « HTML « IT news, forums, messages
Re: How to launch programs on my hard disk when URLs are clicked?

Posted by Kevin Darling on 06/13/07 00:41

On Jun 8, 3:38 pm, "scripts.contact" <scripts.cont...@gmail.com>
wrote:
> On Jun 8, 12:13 pm, Kevin Darling <kdarl...@basit.com> wrote:
>
> > In any case, yes, on a PC you can use a .hta file (HTML with a .hta
> > extension) and the WScript object.
>
> The WScript object is only available to WSH scripts not HTA.

You're incorrect. You can instantiate it. Save the following as
an .hta file and start it with IE:

<html>
<script language="javascript">
function start()
{
var oShell = new ActiveXObject("WScript.Shell");
oShell.Run("notepad.exe c:\\test.txt");

}
</script>
<body>
<button onclick="start()">Start Notepad</button>
</body>
</html>

Cheers - Kev

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация