ayaan1206 Posted January 25, 2016 Share Posted January 25, 2016 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: 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. 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. 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... Repeat. (Aw come on. No need for ridiculing my Internet speeds. I know how slow it is.) Link to comment Share on other sites More sharing options...
orbs Posted January 25, 2016 Share Posted January 25, 2016 @ayaan1206 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. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
ayaan1206 Posted January 28, 2016 Author Share Posted January 28, 2016 Thanks for the quick reply! Although I appreciate the help, I can barely understand half of what you said (I'm new to this!) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now