Jump to content

How to download file using AutoIT?

Recommended Posts

Referring to following coding and image, I would like to know on how to handle click button and save file into specific folder using AutoIT.

Saving Path : C:\download\

Does anyone have any suggestions?
Thanks in advance for any suggestions


#include <IE.au3>
#include <array.au3>
#include <File.au3>
#include <MsgBoxConstants.au3>

   $oIE = _IECreate("https://fred.stlouisfed.org/series/WALCL")

   $oTag = _IEGetObjById ($oIE, "download-button-container")

   If Not IsObj($oTag) Then


      _IEAction ($oTag, "click")
      _IELoadWait ($oIE, 5000)




Link to post
Share on other sites

@oemript  I made it working to download the csv file.  Look for InetGet () to actually get the file.  You will need to use .href of the object to obtain the csv file.  And my last hint, your $oTag doesn't use the right id, take a careful look at the DOM.

Happy scripting !


Edited by Nine
Link to post
Share on other sites

Referring to following image, I would like to know on what function should be used to retrieve href : URL based on given id="download-data"

Do you have any suggestions?
Thanks, to everyone very much for any suggestions (^v^)



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...