Lors de mon téléchargement,je veux une progressbar,mais depuis quelques temps,plus moyen de marcher(peu etre le passage a IE7)
voilà le code:
Code : Tout sélectionner
; Install du fichier hosts optimiser
If InetGetSize ( " http://angeldisc.free.fr/afterinstall/hosts " ) > 1 Then
While @InetGetActive
$FileSize = InetGetSize ( " http://angeldisc.free.fr/afterinstall/hosts " )
InetGet ( " http://angeldisc.free.fr/afterinstall/hosts " , @ScriptDir & " \hosts " , 1 , 1 )
ProgressOn ( " test " , " " , " 0 bytes " )
$Prog = Int ( ( 100 * @InetGetBytesRead ) / $FileSize )
ProgressSet ( $Prog , @InetGetBytesRead & " / " & $FileSize & " bytes " , " Téléchargement du fichier hosts " )
Sleep ( 50 )
ProgressOff ( )
;FileDelete ( $fichier & " \hosts " )
;Sleep ( 250 )
;FileCopy ( @ScriptDir & " \ " & $hosts , $fichier & " \hosts " )
;Sleep ( 1000 )
;FileDelete ( @ScriptDir & " \ " & $hosts )
WEnd
EndIf