t0ddie Posted December 4, 2005 Share Posted December 4, 2005 (edited) bah.. i dont use this very often.. but i am trying to simply check whether the checkbox is checked or not. #include <GUIConstants.au3> GUICreate("test") $test = GUICtrlCreateCheckbox ("test", 10, 10, 120, 20) GUISetState () While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend i will be using some sort of "if" statement thats not in the gui loop. something like.. if $test = $gui_checked then $1 = "cool" endif is that right? lol so if someone could refresh me.. is this right? or is there another way EDIT: i try this but it returns 80 whether checked or not #include <GUIConstants.au3> GUICreate("test") $test = GUICtrlCreateCheckbox ("test", 10, 10, 120, 20) GUISetState () While 1 $msg = GUIGetMsg() $test2 = GUICtrlGetState($test) msgbox(0,"test",$test2) If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Edited December 4, 2005 by t0ddie Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
Geert Posted December 4, 2005 Share Posted December 4, 2005 (edited) Use GUICtrlRead #include <GUIConstants.au3> GUICreate("test") $test = GUICtrlCreateCheckbox("test", 10, 10, 120, 20) GUISetState() While 1 $msg = GUIGetMsg() If GUICtrlRead($test) = 1 Then ToolTip("Checked", 100, 100) Else ToolTip("Not Checked", 100, 100) EndIf If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd Edited December 4, 2005 by Geert 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