GianAutoitprogrammer 0 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... Share this post Link to post Share on other sites
chimung1994 0 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 Share this post Link to post Share on other sites