Jump to content
Sign in to follow this  

Making AutoIT re-download failed files

Recommended Posts

Alright guys, here's a hard one for y'all (I'm not really sure what qualifies as hard here as I've just started AutoIT and my account is only a few secods old).


What I Want to Do:

  1. I download a certain file from a website, but my net is just too pathetically slow (On a good day it maxes out at 60 kbps). What I guess happens is that whenever I download a particularly large file, say above 100MB, the website closes the connection and the speed plummets to 0 Bytes/s.
  2. I use IDM to resume the download again. But that's not the issue. The thing is, the website make Chrome download the file, so I have to cancel the 0 Bytes/s download on IDM, resume it so I can get another link for it to continue, go on Chrome, cancel the download there and use the link in the Chrome download box to resume on IDM.
  3. I know, I know... It's a particularly useless script for anyone besides me, but is it possible for you guys to help me out with this? Would AutoIT be capable of this level of automation? I'd do it myself you know, but it gets rather tedious after the first 100 times.


Here's screenshots of the process:

IDM download fails, so I try to resume it:


Waiting for another download link:


Download Manually:


Chrome catches the download, So IDM can't automatically resume...


Download itslef:


Cancel and use IDM:


Download resumes...




(Aw come on. No need for ridiculing my Internet speeds. I know how slow it is.)

Share this post

Link to post
Share on other sites


welcome to AutoIt and to the forum!

first, let me compliment your clear presentation of the issue. that is certainly the right foot to start with, for this forum.

now, let me see if i understand your issue correctly. you are using IDM to download a file with a fixed name but alternating address, but IDM does not recognize the alternating address as a match to the file name, so it can not continue automatically. is this correct?

if so, then the pure and simple thing would be to look at IDM options. perhaps it can be configured to manage its downloads by file name, rather than by address? or maybe it's just a bug, and IDM should match the link to the name anyway? this may help.

suppose IDM configuration is not the answer. so as for your question: yes, AutoIt can do it. but it becomes much easier if you use the proper tools for the job, and use background automation where possible. here is how i would approach the issue:

1) use IE instead of chrome. IE can be automated much more extensively than Chrome (see AutoIt help > User Defined Functions > IE Management). for the next steps, i would even make the IE process hidden, because ideally, the user need not be involved.

2) make IE navigate to the page where you have the alternating download link.

3) read the objects at the page to find the new address of the link (no downloading is required).

4) now that you have the new address, the way to feed it to IDM may vary. i am not a user of IDM so i can't offer any specific assistance, but i have noticed IDM has an API. the VB example at the bottom of that page can be rewritten for AutoIt. if that looks a bit complicated, then i guess IDM has menu operations or shortcut keys you can initiate.

finally, you can have your AutoIt script (once all of the above is functional) running in the background and detecting when the IDM download is interrupted, and launching this sequence of events as needed.


but first, as mentioned above, i suggest you investigate IDM configuration.

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...