GianAutoitprogrammer Posted May 30, 2011 Share Posted May 30, 2011 Hellow How to read two inputbox in a gui and compare it if those two is the same text I have tried this code: nut it does not work IF GUICtrlRead($input1) == $input2 Then Msgbox(64, "d", "done!") else Msgbox(16, "ERROR!", "ERROR") Endif mt gui + code #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 571, 223, 192, 124) $Input1 = GUICtrlCreateInput("Input1", 32, 16, 433, 21) $Input2 = GUICtrlCreateInput("Input2", 32, 48, 433, 21) $Button1 = GUICtrlCreateButton("Button1", 208, 80, 89, 33) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $button IF GUICtrlRead($input1) == $input2 Then Msgbox(64, "d", "done!") else Msgbox(16, "ERROR!", "ERROR") Endif EndSwitch WEnd a bit help is needed... Link to comment Share on other sites More sharing options...
chimung1994 Posted May 30, 2011 Share Posted May 30, 2011 I think the code is: IF GUICtrlRead($input1) == GUICtrlRead($input2) Then Msgbox(64, "d", "done!") else Msgbox(16, "ERROR!", "ERROR") Endif Link to comment Share on other sites More sharing options...
GianAutoitprogrammer Posted May 30, 2011 Author Share Posted May 30, 2011 tnx 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