Hallo zusammen...
Kann mir da mal bitte jemand aufs Pferd helfen?
Ich versuche über ein Script eine Datei auf den Server zu legen... nur klappt das leider nicht...
Hier ist der Schnippel dazu:
[autoit]
Case $SendButton
GUICtrlDelete($label_1)
$dllhandle = DllOpen('wininet.dll')
_DebugSetup( StringTrimRight(@ScriptName,4) &' example', True)
$UploadFile = (@ScriptDir & "\gpw.ini")
$Ftp_FileName = "\Downloads\gpw.ini"
$server = 'ftp.*******.de'
$username = '**********+'
$pass = '**************'
$Open = _FTP_Open('MyFTP Control')
$Callback = _FTP_SetStatusCallback($Open, 'FTPStatusCallbackHandler')
$Conn = _FTP_Connect($Open, $server, $username, $pass, 0, $INTERNET_DEFAULT_FTP_PORT, $INTERNET_SERVICE_FTP, 0, $Callback)
Local $Ftpp = _FTP_FilePut('MyFTP Control', $UploadFile, $Ftp_FileName, $Callback)
Local $Ftpc = _FTP_Close($Open)
;~
;~
;~
Func FTPStatusCallbackHandler($hInternet, $dwContent, $dwInternetStatus, $lpvStatusInformation, $dwStatusInformationLength)
If $dwInternetStatus = $INTERNET_STATUS_REQUEST_SENT Or $dwInternetStatus = $INTERNET_STATUS_RESPONSE_RECEIVED Then
Local $Size, $iBytesRead
$Size = DllStructCreate('dword')
_WinAPI_ReadProcessMemory(_WinAPI_GetCurrentProcess(), $lpvStatusInformation, DllStructGetPtr($Size), $dwStatusInformationLength, $iBytesRead)
_DebugOut(_FTP_DecodeInternetStatus($dwInternetStatus) & ' | Size = ' & DllStructGetData($Size, 1) & ' Bytes Bytes read = ' & $iBytesRead )
Else
_DebugOut(_FTP_DecodeInternetStatus($dwInternetStatus) )
EndIf
EndFunc ;==>_InternetStatusCallback
Hier dann das Fenster vom CallbackHandler: