Guten Abend zusammen,
dies hier wäre meine Letzte Frage für heute:
Hier erst mal mein Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <FTPEx.au3>
$Open = _FTP_Open('FTP')
$server = ''
$username = ''
$pass = ''
$Conn = _FTP_Connect($Open, $server, $username, $pass)
$erconn = @error
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Installtion wird gestartet", 613, 201, 192, 132)
$Button1 = GUICtrlCreateButton("Abbrechen", 448, 168, 75, 25)
$Button2 = GUICtrlCreateButton("Download", 528, 168, 75, 25)
$percent = GUICtrlCreateProgress(8, 40, 598, 29)
$Label1 = GUICtrlCreateLabel("Installationskomponenten werden Heruntergeladen...", 8, 8, 498, 28)
GUICtrlSetFont(-1, 11, 800, 0, "MS Sans Serif")
$Group1 = GUICtrlCreateGroup("Status Informationen", 8, 80, 593, 81)
$Label2 = GUICtrlCreateLabel("Pfad: " &@ScriptDir&"\"&@ScriptName, 16, 104, 235, 20)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$KBS = GUICtrlCreateLabel("KB\s: Beispiel... 150", 16, 120, 235, 20)
$MB = GUICtrlCreateLabel("Größe: 1 von 1,4 MB", 16, 136, 245, 20)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
_FTP_ProgressDownload($Conn,@UserProfileDir&"\Test.bmp","Test.bmp", "_UpdateProgress")
EndSwitch
WEnd
Func _UpdateProgress($Percentage)
GUICtrlSetData($percent,$percent &"%")
If _IsPressed("77") Then Return 0 ; Abort on F8
Return 1 ; bei 1 Fortsetzten
Endfunc
Wie kann ich nun die Download gewindigkeit und die schon heruntergeladenen MB's anzeigen ?
MFG:
Cpatcha aka Marcel