sndk
Programmer
- Feb 15, 2012
- 1
In the below script objShell works well but Wscript.run fails to identify the object.
<HTML>
<HEAD>
<TITLE>Test Button Events</TITLE>
</HEAD>
<BODY>
<FORM NAME="Form1">
<INPUT TYPE="Button" NAME="Button1" VALUE="Click">
<SCRIPT FOR="Button1" EVENT="onClick" LANGUAGE="VBScript">
set objShell = CreateObject("WScript.Shell")
Set fso=CreateObject("Scripting.FileSystemObject")
Wscript.run "Some xyz Function"
Wscript.Sleep 500
objShell.SendKeys "{Enter}"
</SCRIPT>
</FORM>
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE>Test Button Events</TITLE>
</HEAD>
<BODY>
<FORM NAME="Form1">
<INPUT TYPE="Button" NAME="Button1" VALUE="Click">
<SCRIPT FOR="Button1" EVENT="onClick" LANGUAGE="VBScript">
set objShell = CreateObject("WScript.Shell")
Set fso=CreateObject("Scripting.FileSystemObject")
Wscript.run "Some xyz Function"
Wscript.Sleep 500
objShell.SendKeys "{Enter}"
</SCRIPT>
</FORM>
</BODY>
</HTML>