Brauche hilfe über GUICtrlCreateRadio

  • hallo leute hab mal ne frage

    wisst ihr wie ich mehrere GUICtrlCreateRadio auswählen kann zb ich will einmal wmplayer auswählen dann msnmsgr xfire und so weiter und am ende nur noch auf beenden drücken tu und es werden dann die ausgewählten GUICtrlCreateRadio geschlossen

    [autoit]

    #include <GUIConstants.au3>

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

    #Region ### START Koda GUI section ### Form=

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

    $Form1 = GUICreate("Form1", 216, 472, 367, 305)
    $Radio1 = GUICtrlCreateRadio("Windows Media Player", 16, 24, 137, 17)
    processClose("wmplayer.exe")
    $Radio2 = GUICtrlCreateRadio("MSN Messenger", 16, 48, 113, 17)
    processClose("msnmsgr.exe")
    $Radio3 = GUICtrlCreateRadio("ICQ", 16, 72, 113, 17)
    processClose("ICQ.exe")
    $Radio4 = GUICtrlCreateRadio("Mozilla Firefox", 16, 96, 113, 17)
    processClose("firefox.exe")
    $Radio5 = GUICtrlCreateRadio("Internet Explorer", 16, 120, 113, 17)
    processClose("iexplore.exe")
    $Radio6 = GUICtrlCreateRadio("AutoIT", 16, 144, 113, 17)
    processClose("AutoIT3.exe")
    $Radio7 = GUICtrlCreateRadio("FL Studio 8", 16, 168, 113, 17)
    processClose("FL.exe")
    $Radio8 = GUICtrlCreateRadio("X Fire", 16, 192, 113, 17)
    processClose("Xfire.exe")
    $Radio9 = GUICtrlCreateRadio("Sidebar", 16, 216, 113, 17)
    ProcessClose("sidebar.exe")
    $Radio10 = GUICtrlCreateRadio("HOTKEYS", 16, 240, 113, 17)
    processClose("HotKeys.exe")
    $Radio11 = GUICtrlCreateRadio("Radio11", 16, 264, 113, 17)
    $Radio12 = GUICtrlCreateRadio("Radio12", 16, 288, 113, 17)
    $Radio13 = GUICtrlCreateRadio("Radio13", 16, 312, 113, 17)
    $Radio14 = GUICtrlCreateRadio("Radio14", 16, 336, 113, 17)
    $Radio15 = GUICtrlCreateRadio("Alles Beenden", 64, 408, 113, 17)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    EndSwitch
    WEnd

    [/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit]
  • mit

    [autoit]

    GUICtrlSetState ( controlID, state )

    [/autoit]

    kannst du stati per script setzen...

    mit

    [autoit]

    GUICtrlGetState ( [controlID] )

    [/autoit]

    kannst du den status auslesen... in deinem fall willst du wohl alle angehakten "programme" beenden?! hierzu kannst du dann diue stati mit if ... then ... elseif... else ... endif abfragenb und entsprechend closen...

    gruß

  • [autoit]


    #Include <GUIConstantsEx.au3>
    #NoTrayIcon
    Opt("GUIOnEventMode", 1)
    $main=GUICreate("Vorlage", 160, 80)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_GUIEvents")
    GUISetOnEvent($GUI_EVENT_MINIMIZE, "_GUIEvents")
    GUISetOnEvent($GUI_EVENT_RESTORE, "_GUIEvents")
    $check1=GUICtrlCreateCheckbox("Check 1", 10, 10)
    $check2=GUICtrlCreateCheckbox("Check 2", 10, 30)
    $check3=GUICtrlCreateCheckbox("Check 3", 10, 50)
    $btn=GUICtrlCreateButton("Check...", 80, 30, 70, 23)
    GUICtrlSetOnEvent($btn, "_checkCheckboxes")
    GUISetState(@SW_SHOW, $main)
    While True
    Sleep(10)
    WEnd
    Func _GUIEvents()
    Select
    Case @GUI_CtrlId = $GUI_EVENT_CLOSE
    Exit
    Case @GUI_CtrlId = $GUI_EVENT_MINIMIZE
    Case @GUI_CtrlId = $GUI_EVENT_RESTORE
    EndSelect
    EndFunc ;==> _GUIEvents
    Func _checkCheckboxes()
    MsgBox(0, "States", "Check 1 = " & GUICtrlRead($check1) & @CRLF & "Check 2 = " & GUICtrlRead($check2) & @CRLF & "Check 3 = " & GUICtrlRead($check3))
    EndFunc

    [/autoit]

    mal n kleines beispiel wie man sowas abfragen kan... steht aber auch alles in der hilfe ;)