0
我正在尝试登录到密码保护的网站。我在VBScript中使用InternetExplorer对象。错误在于oIE.readystate
的值被读取一次 - 也就是说,在我的循环中,它一次读取oIE.readystate
值,但第二次oIE.readystate
值试图被读取,我得到一个“800A01CE”运行时错误,指出“The远程服务器机器不存在或不可用:'oIE.readystate'“为什么InternetExplorer对象无响应?
此代码在IE6中正常工作;我的公司实施了新的AD政策(不确定如何/如果这影响了这一切),我们现在正在使用IE7。林不知道如果IE7在oIE.readystate
后以某种方式阻止进程。任何建议,非常感谢。
表示法: “ - >”表示我直接在特定行代码执行后写入关于过程输出的注释。
set oIe=wscript.createobject("InternetExplorer.Application", "IE_")
oIe.navigate "www.google.com"
do while oIe.readystate<>4
msgbox "oIE readystate: " & oIE.readystate
''#-->gets here one time and outputs "oIE readstate: 0"
wscript.sleep 1000
msgbox "oIE readystate: " & oIE.readystate
''#-->errors out.
loop
msgbox "outside of oIE readystate: " & oIE.readystate
''#--->never gets here.