ich weiß nicht wie ich ein Download progress machen kann in der neuen autoit version ...
bräuchte da bissl hilfe
"Skript"
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 339, 135, 192, 124)
$Input1 = GUICtrlCreateInput("Input1", 8, 8, 321, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
$Button1 = GUICtrlCreateButton("======> Download <======", 8, 32, 323, 25, $WS_GROUP)
$Progress1 = GUICtrlCreateProgress(8, 64, 326, 25)
$StatusBar1 = _GUICtrlStatusBar_Create($Form1)
_GUICtrlStatusBar_SetSimple($StatusBar1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button1
$link = GUICtrlRead($Input1)
$name = InputBox("Please enter a name !","filename")
inetget($link,$name,1,1)
EndSwitch
WEnd
func _Download()
; weiß nicht
; wie das geht
; deswegen frage
; ich ja auch^^
_GUICtrlStatusBar_SetText($StatusBar1, "Download Abgeschlossen")
EndFunc
"FertigesScript"
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Downloader!", 339, 112, 192, 124)
$Input1 = GUICtrlCreateInput("Input1", 0, 8, 339, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL))
$Button1 = GUICtrlCreateButton("======> Download <======", 0, 32, 339, 25, $WS_GROUP)
$Progress1 = GUICtrlCreateProgress(0, 60, 339, 25)
$StatusBar1 = _GUICtrlStatusBar_Create($Form1)
_GUICtrlStatusBar_SetSimple($StatusBar1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$Percent = 0
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button1
$link = GUICtrlRead($Input1)
$name = InputBox("Please enter a name !","filename")
$load = InetGet($link,$name,1,1)
Do
$filesize = InetGetInfo($load, 1)
Sleep(100)
GUICtrlSetData($Progress1,(InetGetInfo($load, 0)/$filesize)*100)
$Percent = Round((InetGetInfo($load,0)/$filesize)*100,0)
_GUICtrlStatusBar_SetText($StatusBar1,"schon "& $Percent & "% Gedownloadet")
Until InetGetInfo($load, 2)
_GUICtrlStatusBar_SetText($StatusBar1, "Download Abgeschlossen")
EndSwitch
WEnd