Gui Radio problem

  • Hallo

    [autoit]

    #include <GUIConstants.au3>

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    $GUIC = GUICreate("Hallo ivh weis nich was hier rein soll.", 300, 100)
    $ROG = GUICtrlCreateRadio("Google", 10, 10)
    $ROE = GUICtrlCreateRadio("Ebay", 10, 30)
    $ROA = GUICtrlCreateRadio("AutoIt", 10, 50)
    $OK = GUICtrlCreateButton("OK", 100, 20, 50, 20)

    [/autoit][autoit][/autoit][autoit]

    GUISetState(@SW_SHOW, $GUIC)

    [/autoit][autoit][/autoit][autoit]

    While 1
    $GUIMSG = GUIGetMsg()

    [/autoit][autoit][/autoit][autoit]

    If $GUIMSG = $GUI_EVENT_CLOSE Then
    Exit
    EndIf

    [/autoit][autoit][/autoit][autoit]

    If $GUIMSG = $GUI_EVENT_MINIMIZE Then
    GUISetState(@SW_MINIMIZE, $GUIC)
    EndIf

    [/autoit][autoit][/autoit][autoit]

    If $GUIMSG = $GUI_EVENT_RESTORE Then
    GUISetState(@SW_SHOW, $GUIC)
    EndIf

    [/autoit][autoit][/autoit][autoit]

    If $GUIMSG = $OK Then

    [/autoit][autoit][/autoit][autoit]

    $GUIOK = GUIGetMsg()

    [/autoit][autoit][/autoit][autoit]

    If $GUIOK = $ROG Then
    MsgBox(64, "Hallo", "Google", 5)
    EndIf

    [/autoit][autoit][/autoit][autoit]

    If $GUIOK = $ROE Then
    MsgBox(64, "Hallo", "Ebay", 5)
    EndIf

    [/autoit][autoit][/autoit][autoit]

    If $GUIOK = $ROA Then
    MsgBox(64, "Hallo", "AutoIt", 5)
    EndIf
    EndIf
    WEnd

    [/autoit]

    erst wenn man ok klickt soll abgefragt werden welcher Radio makiert wurde.
    aber bei mir kommt keine der drei msgboxen.

    Kann mir jemand helfen?

    • Offizieller Beitrag

    Hallo!

    Auf die schnelle:

    [autoit]

    #include <GUIConstants.au3>

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    $GUIC = GUICreate("Hallo ivh weis nich was hier rein soll.", 300, 100)
    $ROG = GUICtrlCreateRadio("Google", 10, 10)
    $ROE = GUICtrlCreateRadio("Ebay", 10, 30)
    $ROA = GUICtrlCreateRadio("AutoIt", 10, 50)
    $OK = GUICtrlCreateButton("OK", 100, 20, 50, 20)

    [/autoit][autoit][/autoit][autoit]

    GUISetState(@SW_SHOW, $GUIC)

    [/autoit][autoit][/autoit][autoit]

    While 1
    $GUIMSG = GUIGetMsg()

    [/autoit][autoit][/autoit][autoit]

    If $GUIMSG = $GUI_EVENT_CLOSE Then
    Exit
    EndIf

    [/autoit][autoit][/autoit][autoit]

    If $GUIMSG = $GUI_EVENT_MINIMIZE Then
    GUISetState(@SW_MINIMIZE, $GUIC)
    EndIf

    [/autoit][autoit][/autoit][autoit]

    If $GUIMSG = $GUI_EVENT_RESTORE Then
    GUISetState(@SW_SHOW, $GUIC)
    EndIf

    [/autoit][autoit][/autoit][autoit]

    If $GUIMSG = $OK Then

    [/autoit][autoit][/autoit][autoit]

    $read = GUICtrlRead($ROG)
    $read2 = GUICtrlRead($ROE)

    If $read = $GUI_CHECKED Then
    MsgBox(64, "Hallo", "Google", 5)
    ElseIf $read2 = $GUI_CHECKED Then
    MsgBox(64, "Hallo", "Ebay", 5)
    Else
    MsgBox(64, "Hallo", "AutoIt", 5)
    EndIf
    EndIf
    WEnd

    [/autoit]

    Mfg Spider