Jump to content
Surili

Click Save/Save As in IE

Recommended Posts

Hi Everyone - new AutoIT user here so please pardon if this is a stupid question. I've browsed the forums and can't find an answer that I could implement myself.

I have a website that I click a button on the page to download data. Upon doing so, Internet Explorer prompts me at the bottom with:

"Do you want to open or save -filename- from -website-"

How do I automate it such that my script automatically clicks "Save".

 

What I have written so far to bring to that point is:

 

#include <IE.au3>

Local $oIE = _IECreate("https://beta.bls.gov/dataViewer/view/timeseries/CES8000000001")
$oAccess = _IEGetObjById($oIE, "excelclickCE")
_IEAction($oAccess, "click")

 

Share this post


Link to post
Share on other sites

Here :

#include <IE.au3>

Local $oIE = _IECreate("https://beta.bls.gov/dataViewer/view/timeseries/CES8000000001")
$oAccess = _IEGetObjById($oIE, "excelclickCE")
_IEAction($oAccess, "click")
Sleep (800)
Local $hWnd= _IEPropertyGet ($oIE, "hwnd")
Local $hCtrl = ControlGetHandle ($hWnd, "", "DirectUIHWND1")
ConsoleWrite ("Control = " & $hCtrl & @CRLF)
ControlSend ($hWnd, "", $hCtrl, "{F6}{TAB}")
Sleep (800)
ControlSend ($hWnd, "", $hCtrl, "{ENTER}")

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...