Search the Community
Showing results for tags 'inetget slow'.
Found 1 result
Ahoy! I'm having troubles with InetGet(). I'm writing a small program to download files from the net into a specific directory. The method I'm using is as follows: I load a list of files into the .ini stored on my server and then the program splits the list into an array and downloads them into a directory. I think it's straight forward and I love the low resources / cloud capability. However, with my current method downloads > 5mb tend to hang up causing the GUI to report 'not responding' ;( This is running InetGet in its default state (non background). My questions are: 1) Keeping the .ini style array generation, is there a better technique to download my files in a more reliable manner? Global $URL = "http://***.net/download_files/";<= main directory on server Global $dir = @DestopDir & '/download_files';<= main directory on computer Global $netData = StringSplit(_INetGetSource($URL & 'filelist.ini'), "[^]", 1);<= ini file splitting into an array If @error Then;<= makes sure the program downloaded the .ini properly <3 MsgBox(048, 'Unable To Connect', 'Cannot connect to server: unable to retrieve data!') Exit EndIf For $i = 8 To $netData;<= standard 'for' statement to begin breaking down the array at the correct location of files getFiles('folder-1', $netData[$i]) Next Func getFiles($location, $file);<= this called to download the file, the GUI* can be ignored GUICtrlSetData($Progress, '..' & $file) GUICtrlSetBkColor($Progress, 0xC67171) InetGet($URL & $location & $file, $dir & $location & $file, 1, 0) Sleep(1000) GUICtrlSetBkColor($Progress, 0xFFFBF0) EndFunc ;==>getFiles