GUI Auswahl in Vars speichern

  • hi ihr,

    hab folgende GUI

    wenn ich nun auf Button2 klicke soll er 2 msgboxen ausgeben:
    msgbox1: das gewählte datum
    msgbox2: den zu dem RadioButton zugehörigen Text (zB.: Radio1 = "test1", Radio2 = "test2", Radio3 = "test3", usw...)

    mit einer Variablen kann ichs ja, aber ich scheitere daran das ganze so zu machen, daß er beim Klick beide GUI Werte in eine var speichert.

    Kann mir jemand die Schleife zeigen?

    mfg Van :weinen:

  • hab ich ja versucht, allerdings wird ja beim drücken des buttons nur eine var geschickt:

    wie schaff ich es dass er beim drücken des buttons AUCH in $game den zugeörigen text gespeichert hat

    ich durchblicke nicht wie ich die schleife zu schreiben habe und wie er mitbekommt, daß ich ja 2 vars benutzen will...
    :irre:

    2 Mal editiert, zuletzt von Vanaxel (29. November 2006 um 16:36)

    • Offizieller Beitrag

    Meinst du so etwas?

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>
    $Form1 = GUICreate("GUI", 398, 206, 500, 238)
    $Group1 = GUICtrlCreateGroup("Choose", 0, 0, 193, 169)
    $Radio1 = GUICtrlCreateRadio("test1", 8, 20, 180, 17)
    $Radio3 = GUICtrlCreateRadio("test2", 8, 60, 180, 17)
    $Radio2 = GUICtrlCreateRadio("test3", 8, 40, 180, 17)
    $Radio4 = GUICtrlCreateRadio("test4", 8, 80, 180, 17)
    $Radio5 = GUICtrlCreateRadio("test5", 8, 100, 180, 17)
    $Radio6 = GUICtrlCreateRadio("test6", 8, 120, 180, 17)
    $Radio7 = GUICtrlCreateRadio("test7", 8, 140, 180, 17)
    $Date = GUICtrlCreateGroup("", -99, -99, 1, 1)
    $MonthCal1 = GUICtrlCreateMonthCal("2006/11/24", 200, 0, 193, 169)
    $Button1 = GUICtrlCreateButton("DO IT", 264, 176, 129, 25, 0)
    $Button2 = GUICtrlCreateButton("CLOSE", 0, 176, 129, 25, 0)

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

    GUISetState()

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

    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    Exit
    Case $msg = $Radio1
    $game = "test1"
    Case $msg = $Radio2
    $game = "test2"
    Case $msg = $Radio3
    $game = "test3"
    Case $msg = $Radio4
    $game = "Test4"
    Case $msg = $Radio5
    $game = "test5"
    Case $msg = $Radio6
    $game = "test6"
    Case $msg = $Radio7
    $game = "test7"
    Case $msg = $Button1
    $datum = GUICtrlRead($MonthCal1, 1)
    $datum1 = StringReplace($datum, "/", "-")
    $string1 = " 00:00:00"
    $string2 = " 23:59:59"
    $datum2 = $datum1 & $string1
    $datum3 = $datum1 & $string2
    MsgBox(0, "game", $game)
    MsgBox(0, "game", $datum2)
    Case $msg = $Button2
    Exit
    EndSelect
    WEnd

    [/autoit]

    peethebee