J'ai un petit soucie avec l'affichage de la progression d'un transfert FTP. Avec le code ci dessous le transfert s'éffectue, mais la ProgressBar ne réagis pas, pourriez vous m'aidez ?
Code : Tout sélectionner
#include <GUIConstantsEx.au3>
#include <FTPEx.au3>
#include <File.au3>
Opt("GUIOnEventMode", 1)
$server = 'ftp.xxxx.fr'
$username = 'xxxx'
$pass = 'xxxx'
$GUI_FTP = GUICreate("Transfert FTP", 200, 70)
GUISetOnEvent($GUI_EVENT_CLOSE, "WindowCloseForm")
$ProgressBar = GUICtrlCreateProgress(10, 10, 180, 15)
GUICtrlCreateButton("Transfert", 60, 40, 80, 20)
GUICtrlSetOnEvent(-1, "_TransfertFTP")
GUISetState()
While 1
Sleep(100)
WEnd
Func _TransfertFTP()
$Open = _FTP_Open('FTP Control')
$Conn = _FTP_Connect($Open, $server, $username, $pass)
$FTP_FilePut = _FTP_FilePut($Conn, "test", "test", $FTP_TRANSFER_TYPE_UNKNOWN)
_FTP_ProgressUpload($Conn, $FTP_FilePut, "test" , "_Update_Progress")
_FTP_Close($Conn)
_FTP_Close($Open)
EndFunc
Func _Update_Progress($Percentage)
GUICtrlSetData($ProgressBar, $Percentage)
EndFunc
Func WindowCloseForm()
Exit
EndFunc