vbs中使用InternetExplorer.Application出错解决方案
vbs中使用InternetExplorer.Application出错
有以下代码,不知什么原因运行一阵后,会出现:
脚本:...
行:26
字符:4
错误:请求的资源在使用中
代码:800700AA
源:(null)
的错误
为什么会出现这个错误啊,大家帮帮忙
url中的存储的是:
www.xunlei.com
www.sina.com
------解决方案--------------------
http://www.baidu.com/s?wd=%C7%EB%C7%F3%B5%C4%D7%CA%D4%B4%D4%DA%CA%B9%D3%C3%D6%D0
To 2L:
没出错的时候,err.number是0,走else分支……
有以下代码,不知什么原因运行一阵后,会出现:
脚本:...
行:26
字符:4
错误:请求的资源在使用中
代码:800700AA
源:(null)
的错误
为什么会出现这个错误啊,大家帮帮忙
- VBScript code
'显式声明所有变量 Option Explicit Dim oShell, oIE, address, fso, file, url set oShell = WScript.CreateObject ("WScript.Shell") set fso = WScript.CreateObject ("Scripting.FileSystemObject") set oIE = Wscript.CreateObject ("InternetExplorer.Application" , "UMU_") '设置浏览器的属性 oIE.Toolbar = True oIE.Visible = True oIE.Height = 800 oIE.Width = 800 oIE.Silent = True if fso.fileExists ("url.txt") then '持续进行 while true set file = fso.OpenTextFile ("url.txt", 1) '以只读方式打开 while not file.AtEndOfStream '一行一行的读取url地址 url = file.ReadLine oIE.Navigate url while oIE.busy WScript.Sleep 1000 '每隔1秒钟检查 wend wend file.Close wend else WScript.echo "url.txt file does't exists !" end if '消息响应函数 sub UMU_OnQuit () WScript.Quit end sub
url中的存储的是:
www.xunlei.com
www.sina.com
------解决方案--------------------
http://www.baidu.com/s?wd=%C7%EB%C7%F3%B5%C4%D7%CA%D4%B4%D4%DA%CA%B9%D3%C3%D6%D0
To 2L:
没出错的时候,err.number是0,走else分支……