20-09-2012, 06:44 PM
Fonte: ElitePvPers.com
Io mi sono semplicemente permesso di copiare e tradurre il programma.
Io mi sono semplicemente permesso di copiare e tradurre il programma.
Codice:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <INet.au3>
#include <FTP.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Login", 209, 109, 360, 167)
GUISetBkColor(0x000000)
$Button1 = GUICtrlCreateButton("Login", 16, 72, 81, 33)
$Label1 = GUICtrlCreateLabel("Username: ", 8, 8, 50, 17)
GUICtrlSetColor(-1, 0x008000)
$Label2 = GUICtrlCreateLabel("Password: ", 8, 36, 53, 17)
GUICtrlSetColor(-1, 0x008000)
$Input1 = GUICtrlCreateInput("", 64, 8, 137, 21)
$Input2 = GUICtrlCreateInput("", 64, 32, 137, 21)
GUICtrlSetColor(-1, 0xFFFFFF)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsge = GUIGetMsg()
Switch $nMsge
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$Username = GUICtrlRead($Input1)
$Passwort = GUICtrlRead($Input2)
$Logindata = InetRead("ftp://USERNAME.PASSWORD@mio.ftp-server.com/" & $Username & ".txt")
in $SplitLogindata[1] und $SplitLogindata[2]
$BinaryLogindata = BinaryToString($Logindata)
$SplitLogindata = StringSplit($BinaryLogindata, @CRLF)
If $Username = $SplitLogindata[1] Then
If $Passwort = $SplitLogindata[2] Then
MsgBox(0,"Sei loggato!","Benvenuto.")
GUIDelete($Form1)
_Main()
ExitLoop
GUISetState(@SW_HIDE)
EndIf
EndIf
$Label3 = GUICtrlCreateLabel("Errore.", 80, 56, 127, 17)
GUICtrlSetColor(-1, 0x800000)
Sleep(5000)
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func _Main()
;Qua scrivo il codice della gui per lo script che permetterà di avviare i programmi del loader
EndFunc