|
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
[Back to original message]
|