动态创建浏览器的OLE对象
Integer result
oleobject objExplorer,ieDoc
objExplorer = CREATE oleobject
result = objExplorer.ConnectToNewObject( "InternetExplorer.Application")
IF result = 0 THEN
objExplorer.Navigate("about:blank")
ieDoc = objExplorer.document
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 300
objExplorer.Height = 150
objExplorer.Left = 0
objExplorer.Top = 0
objExplorer.Visible = 1
END IF
//这个可以执行JS
oleobject WshShell
WshShell = create oleobject
WshShell.connecttonewobject( "WScript.Shell")
integer li_Return
li_Return = WshShell.Run("cscript E:\validate.js", 1, true)
messagebox("",li_return)
WshShell.DisconnectObject ( )
destroy WshShell