zxzxzx Posted January 2, 2008 Posted January 2, 2008 hi, I want to download more files at time . How to use Inetget command ? Or How to do ? Help me, please Thank
WolfWorld Posted January 2, 2008 Posted January 2, 2008 InetGet ( "URL" [,"filename" [, reload [, background]]] ) InetGet ( "URL" ,"filename" , 0 or 1, here put 1 ) Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets!
zxzxzx Posted January 2, 2008 Author Posted January 2, 2008 InetGet ( "URL" [,"filename" [, reload [, background]]] ) InetGet ( "URL" ,"filename" , 0 or 1, here put 1 ) I tested, but can't download theme at time
ChrisL Posted January 2, 2008 Posted January 2, 2008 Try thisAnd before anyone starts! once compiled this will still run on a computer without Autoit installedexpandcollapse popupIf $CmdLine[0] > 0 then Local $GetUrl, $LocalFile, $DontUseCached = 1 For $i = 1 to $CmdLine[0] If StringLeft($CmdLine[$i],4) = "Get:" then $GetUrl = StringTrimLeft($CmdLine[$i],4) If StringLeft($CmdLine[$i],5) = "Save:" then $LocalFile = StringTrimLeft($CmdLine[$i],5) If $CmdLine[$i] = "Reload:0" then $DontUseCached = 0 Next If $GetUrl = "" then Exit If $LocalFile = "" then Exit _InetGet($GetUrl,$LocalFile,$DontUseCached) Exit EndIf _Download("http://www.bbc.co.uk/home/images/main_promo/games/doctor_who_blast_game3.jpg",@scriptDir & "\doctor_who_blast_game3.jpg") _Download("http://www.2inept.co.uk/createdby.gif","createdby.gif") _Download("http://www.2inept.co.uk/softpedia_clean_award_f.gif","softpedia_clean_award_f.gif") Func _Download($Param1URL,$Param2LocalFile,$Param3NoCache = 1) If @compiled then Run (FileGetShortName(@AutoItExe) & ' "Get:' & $Param1URL & '" "Save:' & $Param2LocalFile & '"' & ' "Reload:' & $Param3NoCache & '"') Else Run (FileGetShortName(@AutoItExe) & ' /Autoit3ExecuteScript "' & @scriptName & '" "Get:' & $Param1URL & '" "Save:' & $Param2LocalFile & '"' & ' "Reload:' & $Param3NoCache & '"') EndIf EndFunc Func _InetGet($URL,$FILENAME,$RELOAD) Local $iNetGet $iNetGet = InetGet($URL,$FILENAME,$RELOAD) If $iNetGet then Msgbox(0 + 64 + 262144,"Download", $FILENAME & " has been downloaded successfully") Else Msgbox(0 + 64 + 262144,"Download", "Failed to download file from" & @crlf & $URL) EndIf EndFunc [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
zxzxzx Posted January 2, 2008 Author Posted January 2, 2008 Try this And before anyone starts! once compiled this will still run on a computer without Autoit installed expandcollapse popupIf $CmdLine[0] > 0 then Local $GetUrl, $LocalFile, $DontUseCached = 1 For $i = 1 to $CmdLine[0] If StringLeft($CmdLine[$i],4) = "Get:" then $GetUrl = StringTrimLeft($CmdLine[$i],4) If StringLeft($CmdLine[$i],5) = "Save:" then $LocalFile = StringTrimLeft($CmdLine[$i],5) If $CmdLine[$i] = "Reload:0" then $DontUseCached = 0 Next If $GetUrl = "" then Exit If $LocalFile = "" then Exit _InetGet($GetUrl,$LocalFile,$DontUseCached) Exit EndIf _Download("http://www.bbc.co.uk/home/images/main_promo/games/doctor_who_blast_game3.jpg",@scriptDir & "\doctor_who_blast_game3.jpg") _Download("http://www.2inept.co.uk/createdby.gif","createdby.gif") _Download("http://www.2inept.co.uk/softpedia_clean_award_f.gif","softpedia_clean_award_f.gif") Func _Download($Param1URL,$Param2LocalFile,$Param3NoCache = 1) If @compiled then Run (FileGetShortName(@AutoItExe) & ' "Get:' & $Param1URL & '" "Save:' & $Param2LocalFile & '"' & ' "Reload:' & $Param3NoCache & '"') Else Run (FileGetShortName(@AutoItExe) & ' /Autoit3ExecuteScript "' & @scriptName & '" "Get:' & $Param1URL & '" "Save:' & $Param2LocalFile & '"' & ' "Reload:' & $Param3NoCache & '"') EndIf EndFunc Func _InetGet($URL,$FILENAME,$RELOAD) Local $iNetGet $iNetGet = InetGet($URL,$FILENAME,$RELOAD) If $iNetGet then Msgbox(0 + 64 + 262144,"Download", $FILENAME & " has been downloaded successfully") Else Msgbox(0 + 64 + 262144,"Download", "Failed to download file from" & @crlf & $URL) EndIf EndFunc Thank you,
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