|
本帖最后由 y602015953 于 2011-11-15 19:19 编辑
-
- Dim filename
- filename=FormatDateTime(now,2)&FormatDateTime(now,3)
- filename=replace(filename,":","")
- filename=replace(filename,"-","")
- filename=replace(filename,"/","")
- Dim control
- Set control = CreateObject("HttpWatch.Controller")
- Dim plugin
- Set plugin = control.IE.New
- plugin.Record
- plugin.GotoUrl("http://www.baidu.com")
- control.Wait plugin, -1
- msgbox "页面加载完成"
- ' Stop recording HTTP
- plugin.Stop
- ' Close down IE
- msgbox filename
- plugin.Log.Save("f:\\"&filename&".hwl")
- msgbox "保存日志完毕"
- plugin.CloseBrowser
- set plugin=nothing
- set control=nothing
复制代码
这样修改以后就不会报错日志生成失败了,原因是先关闭了浏览器,导致log保存失败。
灰常感谢云大大的指教。。。 |
|