bluerein Posted October 11, 2008 Share Posted October 11, 2008 Is it possible to loop Inetget to download a list of files example Func _Download() while 1 $base=iniread("config.ini", "url", "base", "") $file=iniread("config.ini", "files", $1 , "") $sFileURL = $base & $file $sFileDest = $file $iDloadFinalSize = InetGetSize($sFileURL) $iDloadCurrentSize = "0" InetGet($sFileURL, $sFileDest, 1, 0) sleep(2000) wend this downloads the first file called from my ini eg [url] base="http://xxxxxx.co.uk/forums/images/games/" [files] 1=cat_right.gif 2=logo4.gif So basically after its downloaded [files] 1 I need it then to move onto [files] 2 but just cant get it right..I m trying to change the $1 so it changes after each download ... regards bluerein Link to comment Share on other sites More sharing options...
martin Posted October 11, 2008 Share Posted October 11, 2008 Is it possible to loop Inetget to download a list of files example Func _Download() while 1 $base=iniread("config.ini", "url", "base", "") $file=iniread("config.ini", "files", $1 , "") $sFileURL = $base & $file $sFileDest = $file $iDloadFinalSize = InetGetSize($sFileURL) $iDloadCurrentSize = "0" InetGet($sFileURL, $sFileDest, 1, 0) sleep(2000) wend this downloads the first file called from my ini eg [url] base="http://xxxxxx.co.uk/forums/images/games/" [files] 1=cat_right.gif 2=logo4.gif So basically after its downloaded [files] 1 I need it then to move onto [files] 2 but just cant get it right..I m trying to change the $1 so it changes after each download ... regards bluereinMaybe Func _Download() Local $fuleNumber = 1,$base,$file, $sFileURL,$FileDest,$iDloadFinalSize While 1 $base = IniRead("config.ini", "url", "base", "") $file = IniRead("config.ini", "files", $FileNumber, "") If $file = "" Then ExitLoop $sFileURL = $base & $file $sFileDest = $file $iDloadFinalSize = InetGetSize($sFileURL) ; $iDloadCurrentSize = "0" InetGet($sFileURL, $sFileDest, 1, 0) $FileNumber += 1 Sleep(2000) WEnd EndFunc Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
bluerein Posted October 11, 2008 Author Share Posted October 11, 2008 cheers buddy it didnt work but from your example I got it working!!! Thanks martin 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