我'm trying to identify already opened IE window and save downloaded file [.xml]. I' m使用this online XML editor进行测试 . 因此,一旦出现"Do you want to open or save file.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) > 0 Then
    Set objIE = wnd
    Exit For
  End If
Next

WScript.Sleep 500
ObjShell.SendKeys "%{s}"

以上脚本返回运行时错误:

Object不支持此属性或方法:'SendKeys' .

有什么办法可以使用VBScript在IE11中保存已下载的文件?