SniperSA Posted May 4, 2007 Share Posted May 4, 2007 #include <GUIConstants.au3> GUICreate("CPT-GUI", 80, 85) $a1 = GUICtrlCreateInput("Test", 0, 0, 79, 20) $2 = GUICtrlCreateButton("Test",0,20) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() $1 = GUICtrlRead($a1) Select Case $msg = $2 $1 = "Worked Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd What I want the code to do is when $2 is pressed to set the input ($a1) from "Test" to "Worked", that test code didn't work, what would? Link to comment Share on other sites More sharing options...
James Posted May 4, 2007 Share Posted May 4, 2007 #include <GUIConstants.au3> GUICreate("CPT-GUI", 80, 85) $a1 = GUICtrlCreateInput("Test", 0, 0, 79, 20) $2 = GUICtrlCreateButton("Test",0,20) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $2 GuiCtrlSetData($a1, "Worked", "") Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
birdofprey Posted May 4, 2007 Share Posted May 4, 2007 (edited) While 1 $msg = GUIGetMsg() Select Case $msg = $2 GUICtrlSetData ($a1, "Worked" ) Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Edit: ooops, overlaped with Secure_ICT Edited May 4, 2007 by birdofprey Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now