mud409 Posted February 7, 2008 Share Posted February 7, 2008 (edited) This bit of code should download each file stored in downloads.txt which is just a list of url's to those files... it seems as if it's not reading "For $x = 1 to $source2[0]" because it'll only download 1 file then quit... Seems like it's not getting the number of downloads available in the text file... Dim $source2 If Not _FileReadToArray("downloads.txt",$source2) Then MsgBox(4096,"Error", " Error reading downloads.txt error:" & @error) Exit EndIf For $x = 1 to $source2[0] $splita = StringSplit($source2[$x], "/") $num = $splita[0] InetGet($source2[$x], $splita[$num], 1, 1) Next While @InetGetActive If @InetGetActive = 1 Then TrayTip($splita, @InetGetBytesRead, 10, 16) Edited February 7, 2008 by mud409 Link to comment Share on other sites More sharing options...
Valuater Posted February 7, 2008 Share Posted February 7, 2008 Maybe.... #include <File.au3> Dim $source2 If Not _FileReadToArray("downloads.txt", $source2) Then MsgBox(4096, "Error", " Error reading downloads.txt error:" & @error) Exit EndIf For $x = 1 To $source2[0] $splita = StringSplit($source2[$x], "/") $num = $splita[0] TrayTip("Downloading...", $source2[$x], 10, 16) InetGet($source2[$x], $x & "_" & $splita[$num] & ".txt", 1, 0) Next ***** NOT TESTED 8) Link to comment Share on other sites More sharing options...
mud409 Posted February 7, 2008 Author Share Posted February 7, 2008 (edited) I'm not exactly sure what you did to that inet... I haven't tested that but I'd assume it'd make a line like this... ("http://www.whatever.com/download.exe", "1_download.exe.txt", 1, 0) thanks for the suggestion though Edited February 7, 2008 by mud409 Link to comment Share on other sites More sharing options...
Valuater Posted February 7, 2008 Share Posted February 7, 2008 I'm not exactly sure what you did to that inet... I haven't tested that but I'd assume it'd make a line like this... ("http://www.whatever.com/download.exe", "1_download.exe.txt", 1, 0) thanks for the suggestion though without knowing what type of files you are downloading and if the original $splita[$num] was possibly coping over itself every time you downloaded. Listen, this is an example to help your direction, you can change the file name back, otherwise it should work. ....or thanks anway for not giving all the info needed 8) Link to comment Share on other sites More sharing options...
mud409 Posted February 7, 2008 Author Share Posted February 7, 2008 sorry didn't mean to sound like an ass... double reading it now it came off like it even with the thanks... Link to comment Share on other sites More sharing options...
mud409 Posted February 7, 2008 Author Share Posted February 7, 2008 thank you, your suggestion actually has helped me except for the part that I questioned... I needed to include more within the for else 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