Hi hab wieder mal ein Problem :pinch:
will so ein download Programm schreiben
und wollt dabei die zeit für den Download
aus rechnen(Meine Frage wie das funktioniert)
Vielen dank für eure hilfe
Spoiler anzeigen
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Timers.au3>
DirCreate(@ScriptDir & "\Downloads")
$download=InetGet("http://www.foxload.com/files/firefox/yahoo_firefox_5.0_setup_de-foxload.exe",@ScriptDir & "\Downloads\test_ubuntu.iso",1,1) ;der download
$gui=GUICreate("Test",1020,80)
$progressbar=GUICtrlCreateProgress(10,30,1000,20)
$kb_and_procent_label = GuiCtrlCreateLabel("0 kb von 0 kb; 0 % von 100 %" ,10 ,60 ,1000 ,20)
$time_label=GUICtrlCreateLabel("Geschätzte Zeit: ---Wird Berechnet---" ,10 ,10 ,1000 ,20)
GUISetState() ;Gui Erstellung
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit]$msg=GUIGetMsg()
[/autoit] [autoit][/autoit] [autoit]GUICtrlSetData($progressbar, int((InetGetInfo($download,0)/InetGetInfo($download,1))*100)) ;aktualiesierung des Progresses
GUICtrlSetData($kb_and_procent_label ,int(InetGetInfo($download,0)/1024) & " kb von " & int( _
InetGetInfo($download,1)/1024)&" kb; "&int((InetGetInfo($download,0)/InetGetInfo($download,1))*100)&" % von 100 %") ;aktualiesierung des $$kb_and_procent_labels
If $msg = $GUI_EVENT_CLOSE Then Exit
[/autoit] [autoit][/autoit] [autoit]WEnd
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]Func _time()
[/autoit] [autoit][/autoit] [autoit];hier soll die Verbleibende Zeit berechnet werden
;und über GuiCtrlSetData des $time_label aktualiesiert werden
EndFunc
[/autoit]
Und auserdem stört mi des flackern von dem label
kann ma da was da gegen machen
Wer noch verbesserungs vorschläge hatt immer raus damit