#RequireAdmin
#include <FTPEx.au3>
#include <Array.au3>
#include <misc.au3>

While 1
Sleep (3600000)
Global $sPassword = "****"
Global $sUser = "****"
Global $sServer = "****"
Global $spath = "C:/" & "arbeitsprojekt.doc"
Global $sOrdner = "/www"
Global $sFilename = "arbeitsprojekt.doc"

$hProgress = GUICtrlCreateProgress(8, 32, 297, 25)
$hLabel = GUICtrlCreateLabel("", 91, 70, 200, 25)
$hOpen = _FTP_Open("Autoit")
$hConnect = _FTP_Connect($hOpen, $sServer, $sUser, $sPassword, 1)

 _FTP_ProgressUpload($hConnect, $sPath, $sOrdner&$sFilename, "_Update_Progress")


_FTP_Close($hOpen)
_FTP_Close($hConnect)
Sleep(1000)
WEnd

 Func _Update_Progress($iProzent)
    GUICtrlSetData($hProgress, $iProzent)
    GUICtrlSetData($hLabel, "Hochladen bei " & $iProzent & "% (Abbruch mit F8)")
    If _IsPressed("77") Then Return 0
    Return 1
EndFunc