pb中动态创建浏览器的OLE对象

发表于:2007-06-08来源:作者:点击数: 标签:
动态创建浏览器的OLE对象 Integer result oleobject objExplorer,ieDoc objExplorer = CREATE oleobject result = objExplorer.ConnectToNewObject( "Inte .net Explorer.Application") IF result = 0 THEN objExplorer.Navigate("about:blank") ieDoc = obj

动态创建浏览器的OLE对象

Integer result
oleobject objExplorer,ieDoc
objExplorer = CREATE oleobject
result = objExplorer.ConnectToNewObject( "Inte.netExplorer.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

原文转自:http://www.ltesting.net