Vbscript 将下载的文件保存在IE 11中
我试图识别已经打开的IE窗口并保存下载的文件[.xml]。我正在使用它进行测试。所以,一旦“您想打开或保存文件.xml”弹出窗口出现,我需要使用.vbs文件自动保存文件Vbscript 将下载的文件保存在IE 11中,vbscript,internet-explorer-11,Vbscript,Internet Explorer 11,我试图识别已经打开的IE窗口并保存下载的文件[.xml]。我正在使用它进行测试。所以,一旦“您想打开或保存文件.xml”弹出窗口出现,我需要使用.vbs文件自动保存文件 Dim objIE Dim ObjShell Set ObjShell = CreateObject("Shell.Application") For Each wnd In ObjShell.Windows If InStr(1, wnd.FullName, "iexplore.exe", vbTextCompare) &
Dim objIE
Dim ObjShell
Set ObjShell = CreateObject("Shell.Application")
For Each wnd In ObjShell.Windows
If InStr(1, wnd.FullName, "iexplore.exe", vbTextCompare) > 0 Then
Set objIE = wnd
Exit For
End If
Next
WScript.Sleep 500
ObjShell.SendKeys "%{s}"
上面的脚本返回运行时错误:
对象不支持此属性或方法:“SendKeys”
是否有任何方法可以使用VBScript将已下载的文件保存到IE11中?如有疑问,请阅读
SendKeys
是对象的方法,而不是对象。我找到了解决方案,非常感谢您的时间!