HIlfe bei GUI input

04/15/2010 16:00 VRF#1
Hallo,
also ich habe aus übungszwecken ein kleines programm programmiert, das einen input in einer log abspeichert aber irgentwie geht das nich so... kann mir vll jemand helfen??
Quote:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("Form1", 283, 528, 344, 150)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 28, 267, 12, 12)
GUICtrlSetCursor (-1, 0)
$Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 28, 291, 12, 12)
GUICtrlSetCursor (-1, 0)
$Inputbox2 = GUICtrlCreateInput("", 28, 136, 228, 21)
GUICtrlSetCursor (-1, 5)
$Inputbox1 = GUICtrlCreateInput("", 28, 211, 227, 21)
GUICtrlSetCursor (-1, 5)
$Button1 = GUICtrlCreateButton("Log In", 110, 363, 65, 29, $WS_GROUP)
GUICtrlSetCursor (-1, 0)
$Button2 = GUICtrlCreateButton("Sign uo now", 29, 160, 151, 16, BitOR($WS_GROUP,$WS_CLIPSIBLINGS))
GUICtrlSetBkColor(-1, 0xC0DCC0)
GUICtrlSetCursor (-1, 0)
$Button3 = GUICtrlCreateButton("Forgot your passwort?", 29, 237, 111, 13, $WS_GROUP)
GUICtrlSetBkColor(-1, 0xC0DCC0)
GUICtrlSetCursor (-1, 0)
$Pic1 = GUICtrlCreatePic("C:\Dokumente und Einstellungen\Dominik\Desktop\Unbenannt.bmp", 0, 0, 281, 526, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Case $Button1
FileWrite ("pass.txt", $Inputbox2)
FileWrite ("pass.txt", $Inputbox1)
Sleep (1000)

Exit
EndSwitch
WEnd

04/15/2010 16:14 Shadow992#2
Quote:
Originally Posted by VRF View Post
Hallo,
also ich habe aus übungszwecken ein kleines programm programmiert, das einen input in einer log abspeichert aber irgentwie geht das nich so... kann mir vll jemand helfen??
Du musst den Wert der Box erst per GUICtrlRead auslesen :
PHP Code:
FileWrite("test.txt",Guictrlread($Input1)) 
04/15/2010 16:31 VRF#3
Also das führt bei mir auch nur zu nem error
04/15/2010 17:13 mipez#4
Quote:
Originally Posted by VRF View Post
Also das führt bei mir auch nur zu nem error
Code:
$write1 = GuiCtrlRead($Inputbox2)
FileWrite ("pass.txt", $write1)
Probier das mal...