hier soll eine Datei hochgeladen werden,
aber es funktioniert nicht.
PHP Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ftp.au3>
#include <FTPEx.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("OT - Witze Konto", 524, 305, 229, 124)
GUISetIcon("C:\Dokumente und Einstellungen\Stephie\Desktop\0d6bce8f-72b5-40a3-b00f-6980b673fa91-16.ico", -1)
$Input1 = GUICtrlCreateInput("Kontonummer eingeben", 24, 24, 241, 21)
$Input2 = GUICtrlCreateInput("Aktueller Kontostand", 24, 56, 241, 21)
$Button1 = GUICtrlCreateButton("Kontostand anzeigen", 272, 24, 233, 57)
$Group1 = GUICtrlCreateGroup("Aktuelles", 16, 8, 497, 97)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Input3 = GUICtrlCreateInput("Neuen Stand eingeben", 24, 136, 241, 21)
$Button2 = GUICtrlCreateButton("Kontostand aktualisieren", 272, 136, 233, 57)
$Group2 = GUICtrlCreateGroup("Neues", 16, 112, 497, 97)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button3 = GUICtrlCreateButton("Update", 16, 224, 113, 65)
$Button4 = GUICtrlCreateButton("Beenden", 144, 224, 185, 65)
$Button5 = GUICtrlCreateButton("About", 344, 224, 137, 65)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button1
auslesen()
Case $Button2
$schreiben = IniWrite("1.ini", guictrlread($Input1), "Anzahl", guictrlread($Input3))
Sleep(2000)
$serv = "****************"
$user = "****************"
$pass = "****************"
$FTP = _FTPOpen("AutoIt v3")
$FTPServer = _FTPConnect($FTP,$serv,$user,$pass,1)
ProgressOn("Upload","Uploading file [Cancel with F8]")
$x = _FTP_UploadProgress($FTPServer, "1.ini", '1.ini', "_UpdateParts")
ProgressSet(100,"Return: " & $x & @CRLF & "Error: " & @error)
Sleep(2000)
ProgressOff()
_FTPClose($FTPServer)
_FTPClose($FTP)
Func _UpdateParts($percent)
ProgressSet($percent,$percent &"%")
If _IsPressed("77") Then Return 0
Return 1 ; bei 1 Fortsetzten
Endfunc
Case $Button3
Run("update.exe")
Case $Button4
Exit
Case $Button5
Run("about.exe")
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func auslesen()
HttpSetUserAgent("Mozilla/5.0 (Windows; U; Windows NT 18.0; de; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15 ( .NET CLR 3.5.30729; .NET4.0E)")
InetGet("http://sanctuaryfs.***********/1.ini",@ScriptDir & "\1.ini", 1,1)
Sleep(3000)
$speicher = IniRead("1.ini", guictrlread($Input1) , "Anzahl","")
GUICtrlSetData($Input2, $speicher)
EndFunc






