﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1080	InetGet doesn't return immediately for a background download	bjashepherd@…	Valik	"I have some code that loops through and downloads a series of images. It's nice to see that we can download several files simultaneously in the background in the beta now. However, I'm not sure it's working.


{{{
Dim $dlHandle[11]
$baseURL = 'http://flickrslideshow.fateback.com/temp/a ('

$folder = @TempDir & '\au3temp\'
DirCreate ($folder)
For $i = 0 To 10
	$fileName = $folder & $i & '.jpg'
	$timer = TimerInit ()
	$dlHandle[$i] = InetGet ($baseURL & $i & ').jpg', _
		$fileName, 1, 1)
	ConsoleWrite(TimerDiff ($timer) & @CRLF)
Next

For $i = 0 To 10
	While Not InetGetInfo ($dlHandle[$i], 2) ;complete?
		Sleep (100)
	WEnd
	InetClose ($dlHandle[$i])
Next
}}}

Setting the fourth arg of InetGet to 1 should mean it downloads in the background and returns immediately. However, it takes roughly half a second in each case in this script - about the same amount of time taken to download the entire file. When there are a lot of files, this starts to take up a lot of time.

ben"	Feature Request	closed	3.3.1.2	AutoIt		Blocking	Completed		
