|
这是经过大家的帮助,写的一段代码。共享出来,也请大家来优化它。谢谢
Public Function SetupBrowser(Browser)
StartURL = "http://localhost/*****"
IF Browser ="IE" Then
Set MyBrowser = CreateObject("InternetExplorer.Application")
MyBrowser.Visible = True
While MyBrowser.busy
Wend
MyBrowser.Navigate StartURL
End If
If Browser ="FireFox" Then
SystemUtil.Run "firefox.exe", StartURL
End If
End Function
Public Function CloseBrowser(Browser)
IF Browser ="IE" Then
MyBrowser.Quit
End If
If Browser ="FireFox" Then
systemutil.closeprocessbyname "firefox.exe"
End If
End Function |
|