eekhoorn12 Posted November 15, 2005 Share Posted November 15, 2005 Why does this script return 3 #include <GUIConstants.au3> GUICreate ( "title" , 800 , 600 ) ; will create a dialog box that when displayed is centered $RESULT = GUICtrlCreateInput("", 110, 40, 100, 20) $Start = GUICtrlCreateButton ("OK", 60, 70, 50) GUICtrlSetState(-1,$GUI_DEFBUTTON) GUISetState (@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $MSG = $GUI_EVENT_CLOSE Exit Case $msg = $Start MsgBox(0, '', $RESULT) EndSelect Wend Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 15, 2005 Moderators Share Posted November 15, 2005 It's showing you the control id, if you move the $start above the $result, you should get $result to return "4" as an example. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 15, 2005 Moderators Share Posted November 15, 2005 Example: #include <GUIConstants.au3> GUICreate ( "title" , 800 , 600 ); will create a dialog box that when displayed is centered $Start = GUICtrlCreateButton ("OK", 60, 70, 50) $RESULT = GUICtrlCreateInput("", 110, 40, 100, 20) GUICtrlSetState(-1,$GUI_DEFBUTTON) GUISetState (@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $MSG = $GUI_EVENT_CLOSE Exit Case $msg = $Start MsgBox(0, '', $RESULT) EndSelect Wend Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
LxP Posted November 22, 2005 Share Posted November 22, 2005 In case you're still wondering, to see the value of the input field you want to change your MsgBox() line to this:MsgBox(0, '', GUICtrlRead($Result)) 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