There was a time when I became a dying hard fan of Mahabharat, I waned to watch each and every episode of BR Chopra's. I had a notepad file that had all the links. Now I just needed to download them one by one. So here's what I wrote:-
#include <InetConstants.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIFiles.au3>
#include <ie.au3>
#include <file.au3>
#include <FileConstants.au3>
$file = @DesktopDir&"\mahabharat.txt"
FileOpen($file, 0)
For $i = 1 to _FileCountLines($file)
$line = FileReadLine($file, $i)
Local $hDownload = InetGet($line, @DesktopDir & "\" & StringRight($line,6) , $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
Do
Sleep(250)
Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE)
ConsoleWrite($line&@CRLF)
Next
FileClose($file)
No comments:
Post a Comment