#include <IE.au3>
Global $Complete, $oIE[3], $iComplete[3], $Url[3] = ["www.google.com", "www.autoitx.com", "www.autoitscript.com"]
For $i = 0 To 2
$oIE[$i] = _IECreate($Url[$i], 0, 1, 0)
Next
AdlibRegister("State", 100)
While Not($Complete)
Sleep(100)
WEnd
ConsoleWrite("Done!" & @LF)
Func State()
Local $State
If $Complete Then Return AdlibUnRegister("State")
For $i = 0 To 2
If Not $iComplete[$i] Then
$State = _IEPropertyGet($oIE[$i], "readyState")
If String($State) = "complete" Or $State = 4 Then
$iComplete[$i] = Not $iComplete[$i]
ConsoleWrite($Url[$i] & " Download Complete!" & @LF)
EndIf
EndIf
Next
If $iComplete[0] And $iComplete[1] And $iComplete[2] Then $Complete = Not $Complete
EndFunc ;==>State
|