标题: VBS中GetObject 0x800A0007内存不足,如何修正? [打印本页]
作者: sig13 时间: 2010-5-20 09:42 标题: VBS中GetObject 0x800A0007内存不足,如何修正?
- Dim oDomX
-
- Do
- Wscript.echo "Loading " & lnk.outerText & "... " & lnk.href
- On Error Resume Next
- Set oDomX = WScript.GetObject(lnk.href)
- If Err.Number = 0 Then
- loadPage = WaitLoading(oDomX)
- Else
- Wscript.echo "ERR #" & CStr(Hex(Err.Number)) & " " & Err.Description
- Wscript.echo "Try again!!!"
- Err.clear
- loadPage = False
- End If
- loop While loadPage = False
-
- Dim fn
- fn = dirName & "\" & lnk.outerText & ".txt"
- Call WriteTextFile(fn, oDomX.body.outerText)
- Set oDomX = Nothing
复制代码
在错误处理那里,一般的错误都可以重新载入就好了,但是要是发生了“0x800A0007 内存不足”就会一直报这个错误,不能恢复。
想问一下,要怎么操作,才可以跳过这个错误,继续处理?
作者: Spring 时间: 2010-5-20 13:26
在代码开头的地方加一行
On Error Resume Next
试试。
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |