Hallo,
ich möchte, das eine Progressbar den Status des Downloads zeigt, das Problem ist, das es bei mir nie richtig funktioniert.
Ich möchte, das es nach einem Download, die Progressbar wieder auf 0 setzt und wieder durchläuft.
Ohne die Progressbar funktioniert alles.
Zum Script: Es werden aus einer .txt Datei Links ausgelesen, die anschließend gedownloadet werden.
Hier das Script:
Spoiler anzeigen
#Include <File.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 625, 445, 192, 124)
$Progress1 = GUICtrlCreateProgress(136, 352, 337, 17)
$Downloadstart = GUICtrlCreateButton("Downloaden", 216, 400, 169, 33, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("Label", 72, 40, 484, 81)
$Input1 = GUICtrlCreateInput("Bitte auf ""Datei auswählen"" klicken", 80, 200, 409, 21)
$auswahlen = GUICtrlCreateButton("Datei auswählen", 368, 224, 121, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
DirCreate("downloader")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $auswahlen
$filedialog = FileOpenDialog("title",@WorkingDir & "\","Textfiles (*.txt;*.ini)")
GUICtrlSetData($Input1,$filedialog)
Case $Downloadstart
If GUICtrlRead($Input1) = "Bitte auf ""Datei auswählen"" klicken" Then
MsgBox(0,"Fehler","Bitte auf ""Datei auswählen"" klicken und eine Datei auswählen")
Else
MsgBox(0,"ok","ok")
Dim $aLinks
_FileReadToArray(GUICtrlRead($Input1),$aLinks)
For $x = 1 to $aLinks[0]
InetGet($aLinks[$x],@ScriptDir&"\downloader\dn_"&$x&".txt")
MsgBox(0,'Record:' & $x, $aLinks[$x])
Next
EndIf
EndSwitch
WEnd