专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > vbScript

vbs中使用InternetExplorer.Application出错解决方案

发布时间:2010-05-20 14:01:29 文章来源:www.iduyao.cn 采编人员:星星草
vbs中使用InternetExplorer.Application出错
有以下代码,不知什么原因运行一阵后,会出现:

脚本:...
行: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分支……
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: