Jump to content

Auto resume failed IDM download


rrd84
 Share

Recommended Posts

Hello,
 
I am new to this forum & software i.e. AutoIt v3  :ILA2:
I am not a programmer, learning  :huh:
I have read about this software when I was trying to make some automation program's, & googling for them.
 
Now I am able to build some small programs via AutoIt.   ;)
 
My problem :

Whenever I am downloading files above 2GB in size, connection drop occurs, due to several reasons,
& download get canceled in IDM(Internet Download Manager), until me by myself resume's it,
My system stays ON for nothing. :(
 
So to avoid this, I am trying to build AutoIt program, that could monitor downloading activity,
If there is any interrupt, then the program will check it & resume interrupted download or
Shutdown system if not able to resume download.
 
 
What I am expecting from program to do :
 
Monitor IDM downloading activity, as,
If download interrupts:
 
Point wise:D
1. Open site (consider zbigz like site) from where downloading is interrupted, then login, if not already logged in,
2. Search link in list & click link who's download has been interrupted in IDM & copy it's download link.
3. Now replace copied link in IDM whose download is interrupted.
4. Then resume download,
5. Then set IDM to shutdown system after download complete or if download is not resuming.
 
 
Problems I am facing :
 
I am not able to copy link because, The link is dynamic I want to copy from site to resume download in IDM.
I am not able to replace link in IDM download info box.
& not able to access IDM via Autoit program
So, basically I am having problem with point 3, 4 & 5  :blink:
 
Can someone help me :( please  :(
Edited by rrd84
Link to comment
Share on other sites

Well, writing some code to show you all of that would be a huge task, but I can point you to the right direction. Or at least this is how I would do it. I'll give you something to work on and then you'll have to study how those things work (as I did when I needed them).

You can check every function with relative code examples in the help file (F1 with editor open).

This will make use of IE library, so include it with #include <IE.au3>

Firstly I would embed the download page in the AutoIT program with an _IECreateEmbedded.

Then I could examine and scan the document links with all the _IE function to get DOM objects like _IEGetObjByName, _IEGetObjById and so on. How to find the correct link name is a logic you'll have to implement yourself as I don't even know how those link are created or how they look like. And then you can copy the link name to a variable with _IePropertyGet or something like that.

There are plenty of way to do this, there is a way to get a complete collection of the links with the _IELinkGetCollection, you can read the whole page source with _IEBodyReadHTML, or just the text with _IEBodyReadText. Do it the way you like.

After that you'll use WinActivate on IDM and copy the link in the right field and click resume button.

You can do this in a number of ways. Main ways I can think of are using ControlClick function and AU3Info (an autoit tool you get in the full install if I remember good) to get the control names which you will pass to ControlClick. But you can just send in Tabulations with Send command and spaces to click the right controls.

If there is some label or something telling you "download interrupted/not resuming" or "download complete", you can read it with ControlGetText and then use Shutdown function to turn off your pc.


Hope it helps.


 

I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...