Digi Posted November 2, 2006 Share Posted November 2, 2006 (edited) Hey guys and girls I need some help please, The Gui Mode of this is really something i just cant seem to get it to easily... I have a Gui. In this Gui i have 3 check Box and 2 buttons. what im trying to do is this how do i say, on Button 1 click, if state checkbox 1 = $GUI_CHECKED then execute........... I cont figure how to get this, the Functions i want to execute are fine i just cant get the how to click button then check state of check buttons then execute the needed function. Edited November 2, 2006 by Digi Saru Mo Ki Kara Ochiru[u]Direct Translation[/u]: Even monkeys will fall from trees.[u]I.E.:[/u] To Error is HumanMy Splash Screen applet: Splash Screen Coding Link to comment Share on other sites More sharing options...
iceberg Posted November 2, 2006 Share Posted November 2, 2006 #include <GuiConstants.au3> $GUI_Handle = GUICreate("MyGUI", 281, 253, (@DesktopWidth - 281) / 2, (@DesktopHeight - 253) / 2) $Radio_1 = GUICtrlCreateRadio("Radio1", 40, 20, 120, 20) $Radio_2 = GUICtrlCreateRadio("Radio2", 40, 60, 90, 30) $Radio_3 = GUICtrlCreateRadio("Radio3", 40, 110, 70, 30) $Button_4 = GUICtrlCreateButton("OK", 30, 200, 100, 30) $Button_5 = GUICtrlCreateButton("Cancel", 150, 200, 100, 30) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_5 ExitLoop Case $msg = $Button_4 If GUICtrlRead($Radio_1) = $GUI_CHECKED Then MsgBox(0, "Result", "Radio 1 checked") ElseIf GUICtrlRead($Radio_2) = $GUI_CHECKED Then MsgBox(0, "Result", "Radio 2 checked") Else MsgBox(0, "Result", "Radio 3 checked") EndIf EndSelect WEnd mouse not found....scroll any mouse to continue. Link to comment Share on other sites More sharing options...
Digi Posted November 2, 2006 Author Share Posted November 2, 2006 #include <GuiConstants.au3> $GUI_Handle = GUICreate("MyGUI", 281, 253, (@DesktopWidth - 281) / 2, (@DesktopHeight - 253) / 2) $Radio_1 = GUICtrlCreateRadio("Radio1", 40, 20, 120, 20) $Radio_2 = GUICtrlCreateRadio("Radio2", 40, 60, 90, 30) $Radio_3 = GUICtrlCreateRadio("Radio3", 40, 110, 70, 30) $Button_4 = GUICtrlCreateButton("OK", 30, 200, 100, 30) $Button_5 = GUICtrlCreateButton("Cancel", 150, 200, 100, 30) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_5 ExitLoop Case $msg = $Button_4 If GUICtrlRead($Radio_1) = $GUI_CHECKED Then MsgBox(0, "Result", "Radio 1 checked") ElseIf GUICtrlRead($Radio_2) = $GUI_CHECKED Then MsgBox(0, "Result", "Radio 2 checked") Else MsgBox(0, "Result", "Radio 3 checked") EndIf EndSelect WEnd WOHOO cool beans thanks dude. Saru Mo Ki Kara Ochiru[u]Direct Translation[/u]: Even monkeys will fall from trees.[u]I.E.:[/u] To Error is HumanMy Splash Screen applet: Splash Screen Coding 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