MadBoy Posted January 5, 2006 Posted January 5, 2006 GUICreate("Installer ver. " & $version, 375,500) ; Create the controls $button_1 = GUICtrlCreateButton ("Install", 50, 450, 120, 40) $group_1 = GUICtrlCreateGroup ("Profile:", 2, 50, 175, 200) GUIStartGroup() $radio_1 = GUICtrlCreateRadio ("Standard", 5, 70, 150, 20) $radio_2 = GUICtrlCreateRadio ("Mobile", 5, 100, 150, 20) $radio_3 = GUICtrlCreateRadio ("Advanced", 5, 130, 150, 20) GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $button_1 AND $radio_1 MsgBox(0, "Default button clicked", "Radio 1" ) Case $msg = $button_1 AND $radio_2 MsgBox(0, "Default button clicked", "Radio 2" ) Case $msg = $button_1 AND $radio_3 MsgBox(0, "Default button clicked", "Radio 3" ) EndSelect WEnd Why this Case $msg = $button_1 AND $radio_3 always exectues msg from first case where radio_1 is. I have no clue how to make it ;( Help. I want the to choose radio button and then click Button to execute MSGBOX. My little company: Evotec (PL version: Evotec)
GaryFrost Posted January 5, 2006 Posted January 5, 2006 (edited) #include <GuiConstants.au3> $version = "1.0" GUICreate("Installer ver. " & $version, 375, 500) ; Create the controls $button_1 = GUICtrlCreateButton("Install", 50, 450, 120, 40) $group_1 = GUICtrlCreateGroup("Profile:", 2, 50, 175, 200) GUIStartGroup() $radio_1 = GUICtrlCreateRadio("Standard", 5, 70, 150, 20) $radio_2 = GUICtrlCreateRadio("Mobile", 5, 100, 150, 20) $radio_3 = GUICtrlCreateRadio("Advanced", 5, 130, 150, 20) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $button_1 And BitAnd(GUICtrlRead($radio_1),$GUI_CHECKED) = $GUI_CHECKED MsgBox(0, "Default button clicked", "Radio 1") Case $msg = $button_1 And BitAnd(GUICtrlRead($radio_2),$GUI_CHECKED) = $GUI_CHECKED MsgBox(0, "Default button clicked", "Radio 2") Case $msg = $button_1 And BitAnd(GUICtrlRead($radio_3),$GUI_CHECKED) = $GUI_CHECKED MsgBox(0, "Default button clicked", "Radio 3") EndSelect WEnd Edited January 5, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
MadBoy Posted January 5, 2006 Author Posted January 5, 2006 (edited) Great. It works. Tnx. Edited January 5, 2006 by MadBoy My little company: Evotec (PL version: Evotec)
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