IE Com Save Dialog - Auto Save using ACC
Posted: 21 Apr 2017, 17:15
I have a csv file on a webpage I wish to download. I am doing through COM control instead of URLDownload (or similar) because of all the login credentials, https encryption, authentication tokens, etc.
I am able to use Send !s (Alt-s) and successfully save it, however I need to keep the window hidden, so this won't work. I attempted numerous iterations of ControlSend using !s or {f6}{tab}{Enter} (another keystroke shortcut to it) but none seem successful.
I found this post which successfully uses the ACC to cancel the same dialog. Thanks jeeswg
https://autohotkey.com/boards/viewtopic ... 43#p127543
Despite this, I cannot figure out the correct argument settings to reach the save button despite looking via ACC viewer.
I am able to use Send !s (Alt-s) and successfully save it, however I need to keep the window hidden, so this won't work. I attempted numerous iterations of ControlSend using !s or {f6}{tab}{Enter} (another keystroke shortcut to it) but none seem successful.
I found this post which successfully uses the ACC to cancel the same dialog. Thanks jeeswg
https://autohotkey.com/boards/viewtopic ... 43#p127543
Code: Select all
;internet explorer - notification bar interactions
;to test whether it's visible and retrieve its name (it should be 'Notification')
#Include Acc.ahk
WinGet, hWnd, ID, A
ControlGet, hCtl, Hwnd, , DirectUIHWND1, ahk_id %hWnd%
ControlGet, vIsVisible, Visible, , DirectUIHWND1, ahk_id %hWnd%
oAcc := Acc_ObjectFromWindow(hCtl)
MsgBox % vIsVisible " " oAcc.accName(0)
;to close the notification bar
;Acc_Get(Cmd, ChildPath="", ChildID=0, WinTitle="", WinText="", ExcludeTitle="", ExcludeText="")
oAcc := Acc_Get("Object", "4.5", 0, "ahk_id " hCtl)
oAcc.accDoDefaultAction(0)
Return