Can we pause and resume the download in the InetGet function?
If is possible, what is the solution please?
I used this code To manage the download
#include <INet.au3> func _downloader($name, $linc, $filepath, $RTLF = false, $link = false) global $downloader = GUICreate("downloader", 400, 200, -1, -1, $WS_CLIPCHILDREn, $RTLF, $link) global $path = $filePath $labelTxt = GUICtrlCreateLabel("downloading " & $name, 50, 10, 200, 20) global $labelTxt0 = GUICtrlCreateLabel("downloaded size 0 MB " & "OF 0 MB", 50, 60, 300, 20) global $Progress = "" global $sText = "" For $i = 1 To Random(5, 20, 1) ; Return an integer between 5 and 20 to determine the length of the string. $sText &= Chr(Random(65, 122, 1)) ; Return an integer between 65 and 122 which represent the ASCII characters between a (lower-case) to Z (upper-case). next global $labelTxt2 = GUICtrlCreateInput("0%", 50, 80, 50, 20) _GUICtrlEdit_SetReadOnly(-1, true) GUIStartGroup("") global $beep = GUICtrlCreateCheckBox("use the progress beep notification", 150, 120, 200, 20) GUIStartGroup("") $button = GUICtrlCreateButton("Cancel', 130, 150, 180, 25, 0x01) $iIndex = 0 global $Target global $url GUIStartGroup("") global $Progress = GUICtrlCreateProgress(50, 90, 150, 20) global $Target = $filepath global $url = $linc global $path = $filepath global $hDownloadNo = _RSMWare_GetData($url, $Target) global $status = false AdlibRegister("SetProgress") global $onprogress = false, $curent = false GUISetState(@sw_Show) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $button $asc = MsgBox(4132,"exit download?","if you click yes the downloading will be cancel, do you want to cancel it ?") if $asc = 6 then AdlibUnRegister("SetProgress") GUIDelete() If $hDownloadNo <> 0 Then InetClose($hDownloadNo) exitLoop endIf EndSwitch if $status = -1 then $status = 0 $hDownloadNo = _RSMWare_GetData($url, $Target) $onprogress = false $curent = false elseIf $Status = 1 then $status = $path GUIDelete() AdlibUnRegister("SetProgress") exitLoop endIf WEnd return $status endFunc Func _RSMWare_GetData($url, $Target) Local $hDownload = InetGet($url, $Target, 1, 1) Return $hDownload EndFunc ;==>_RSMWare_GetData Func SetProgress() Local $state If $hDownloadNo <> 0 Then $state = InetGetInfo($hDownloadNo) If @error = 0 Then $infor = "downloaded size " & Round(Execute(InetGetInfo($hDownloadNo, $INET_DOWNLOADREAD) / 1048576), 2) & " MB of " & Round(Execute(InetGetInfo($hDownloadNo, $INET_DOWNLOADSIZE) / 1048576), 2) & " MB " $onprogress = Round(Ceiling(($state / $state) * 100)) if not (InetGetInfo($hDownloadNo, $INET_DOWNLOADSIZE) = 0) then if $onProgress <= 0 then $onProgress = 0 GUICtrlSetData($Progress, $onProgress) GUICtrlSetData($labelTxt0, $infor) GUICtrlSetData($labelTxt2, $onProgress & "%") if _isChecked($beep) then if $onprogress > $curent then beep((100 + $onprogress * 20), 100) $curent = $onprogress endIf endIf endIf If $state Then If $state Then InetClose($hDownloadNo) $status = 1 else InetClose($hDownloadNo) $status = -1 endIf endIf EndIf endIf EndFunc ;==>SetProgress
How can I automatically download a list of zip files, like the ones in the quote, using a AutoIt script?By tintin92
How can I automatically download a list of zip files, like the ones in the quote, using a AutoIt script?
Is it possible with AutoIt script?
Here a small tool I wrote to update my Sysinternal tools collection without the need to download always the whole package or visiting the site to check for updates. I know that there are several tools available (also some tools written in AutoIt) but here another one for the collection. It was good exercise for me to code it.
Some files from cannot be downloaded although they are visible on the web site!
Here the download link of the source code only: AutoIt Sysinternal Tools Synchronizer v0.99.1 build 2017-10-23 beta.7z (1353 downloads previously)
-=> Requires AutoIt version 188.8.131.52 or higher / tested on Win8.1 real machine and some VMs: Win7 / Vista / Win10
Compiled exe only: @MediaFire
Just select the Sysinternal Tools folder or create one and press the synchronize button to download the selected items. Click on AutoIt label (near to left upper corner) to open menu.
Special thanks to LarsJ, Melba23 and mesale0077 for their help.
I've still some ideas to implement which are more gimmick related, so it is not finished yet...
If you want to add your language please check out #Region Language. Thanks.
Please report any bug or if you have any suggestions.
The language of the tool tip from each of the executable in the left list view were automatically created using Google translator and weren't checked for correctness.
May be some of you know Songr .
This script do the same job, it can find more mp3 files but is not as fast as Songr.
Sites used are music search engine Websites designed for LEGAL entertainment purposes only.
Thanks to Brett Francis, Prog@ndy and Eukalyptus for >Bass Udf, trancex for >WinHttp Udf and the AutoIt Community for his help.
Changes of v184.108.40.206
Three websites replaced cause they are dead or use now js.
All search engines updated ( not without difficulties for audiodump)
I use RAGrid.dll for the first listview (more fast and stable, but with some inconvenients to manage the no-edit of cells)
Input queries are saved ( the twenty latest)
I use now an mp3 pre-Load management before playing and a double progressbar for visualize pre-load and play, where you can click for directly go play in the loaded part.
Most includes needed are embedded and all external files are embedded in script with >BinaryToAu3Kompressor .
Multi downloads available with embedded downloader.exe
Changes of v220.127.116.11
Search on audiodump and myfreemp3 fixed.
Added Gui Menu.
Titles are no more editable.
New "About" with >TaskDialog (Thanks Prog@andy)
Query button permit now to check / uncheck all checkboxes
And some few fixes and cleaning.
Really more stable now.
Changes of v18.104.22.168
Dilandau is replaced by mp3chief and mp3ili by mp3clan
Search on mp3juices, baseofmp3 and soundcloud fixed.
Soso now provide m4a (aac) instead of mp3 ( m4a can be played by MSE)
Added possibility to encode automaticaly to mp3, aac or ogg ( at the end of download) using bassenc.dll and command line tools : lame, faac and oggenc.
Changes of v22.214.171.124 mp3skull fixed mp3chief fixed myfreemp3 fixed mp3clan changed to tusmp3 mp3juices changed to emp3world baseofmp3 changed to imp3 and some minor improvements.
Most previous websites used are dead or have changed the way to get links,
so instead of try to repair the previous version, i have created a complete new version.
The main tendency is the simplification :
Only one website : audiodump (Up to 500 results by request)
Script use now the little pearl created by Ward : curl.au3
It permit to create tasks (get source and get multi mp3) in asynchronous mode.
So now, no need to use several executables and no more gui who do not respond in case of connection problems.
Script use Bass.dll X86 loaded in memory for play songs.
Result is light and fast, but don't abuse of audiodump servers who are not beasts of race.
Warning : For avoid errors with curl.au3, you'll need to comment the line 63 : ;~ #Include <BinaryCall.au3>
@AutoItX64 not supported and only tested on Win7X64 and Win8.1X64.
As your browser, use Ctrl+w for remove the current Tab.(if there is no search or download running from it)
And also Ctrl+q for set/remove Gridlines.
Events are displayed to the bottom of the Gui.
Added a Paste Button.
Querry list is now correctly saved.
Querry Combo is now sorted in alphabetical order
After a 'No match', the next search will use the previous empty listview.
Bug when removing tabs is corrected.
Added string correction for the request that, in the previous version, was not always able to return a correct result.
A big thanks to Ward for his great UDF, and Nina my favorite tester, (who between us is also my third daughter), for his precious advices .
previous downloads : 1703
As there is no more script downloads count, source and executable are available in the downloads section
July 2017 Project Discontinued due to website changes
I'm looking to create a script which will download all *.txt files from a remote FTP server.
Once downloaded, delete all *.txt files.
Can this be achieved using AutoIt ?