Probleme/Fragen zu Radiobuttons

  • Hallo Leute,

    Ich suche jetzt seit tagen wie ein weltmeister aber ich hab noch nix gefunden bezüglich meinem problem.
    hab sogar die SuFu hergenommen :D
    eig sinds 2 probleme aber ich fang jez mal mit dem ersten an

    Also:

    Ich habe 2 gruppen mit radiobuttons:

    Spoiler anzeigen
    [autoit]


    #include <GUIConstants.au3>
    #NoTrayIcon

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

    $Form2 = GUICreate("Anmelden", 547, 546, 193, 125)
    $Group1 = GUICtrlCreateGroup("Server", 10, 10, 150, 221)
    $radio1= GUICtrlCreateRadio("1. Mosha", 20, 30, 121, 21)
    $radio2= GUICtrlCreateRadio("2. Karthago", 20, 50, 121, 21)
    $radio3= GUICtrlCreateRadio("3. Astreya", 20, 70, 121, 21)
    $radio4= GUICtrlCreateRadio("4. Hyperion", 20, 90, 121, 21)
    $radio5= GUICtrlCreateRadio("5. Antharos", 20, 110, 121, 21)
    $radio6= GUICtrlCreateRadio("6. Cascardon", 20, 130, 121, 21)
    $radio7= GUICtrlCreateRadio("7. Lesanya", 20, 150, 121, 21)
    $radio8= GUICtrlCreateRadio("8. Torkas", 20, 170, 121, 21)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("Channel", 170, 10, 150, 221)
    $radio9= GUICtrlCreateRadio("CH 1", 180, 30, 121, 21)
    $radio10= GUICtrlCreateRadio("CH 2", 180, 50, 121, 21)
    $radio11= GUICtrlCreateRadio("CH 3", 180, 70, 121, 21)
    $radio12= GUICtrlCreateRadio("CH 4", 180, 90, 121, 21)
    $radio13= GUICtrlCreateRadio("CH 5", 180, 110, 121, 21)
    $radio14= GUICtrlCreateRadio("CH 6", 180, 130, 121, 21)
    GUISetState(@SW_SHOW)

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

    While 1
    ControlClick ("Anmelden", "unsicht", "Button5")
    $nMsg = GUIGetMsg()
    Switch $nMsg

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

    Case $GUI_EVENT_CLOSE
    Exit

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

    EndSwitch
    WEnd

    [/autoit]

    So. vllt hats wer gemerkt soll ein Metin 2 Launcher werden :D
    Also mein problem jetzt:
    ich will dass wenn z.b. der 2. radiobutton also $radio2 angeklickt wird, soll $radio14 unsichtbar werden.
    ich hab das auch schon teilweise hingekriegt aber nur indem ich auf einen button geklickt habe
    nun meine frage: kann man das irgendwie so machen dass er in dem moment wo $radio2 angeklickt wird $radio14 versteckt?

    ich hab auch keine ahnung wie ich das hinbekommen könnte :|
    Und wirklich bewandert bin ich in autoit auch noch nich...
    Ich hoffe auf eure hilfe da mir dieses board hier schon oft geholfen hat

    Padmak

  • Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>
    #NoTrayIcon

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

    $Form2 = GUICreate("Anmelden", 547, 546, 193, 125)
    $Group1 = GUICtrlCreateGroup("Server", 10, 10, 150, 221)
    $radio1= GUICtrlCreateRadio("1. Mosha", 20, 30, 121, 21)
    $radio2= GUICtrlCreateRadio("2. Karthago", 20, 50, 121, 21)
    $radio3= GUICtrlCreateRadio("3. Astreya", 20, 70, 121, 21)
    $radio4= GUICtrlCreateRadio("4. Hyperion", 20, 90, 121, 21)
    $radio5= GUICtrlCreateRadio("5. Antharos", 20, 110, 121, 21)
    $radio6= GUICtrlCreateRadio("6. Cascardon", 20, 130, 121, 21)
    $radio7= GUICtrlCreateRadio("7. Lesanya", 20, 150, 121, 21)
    $radio8= GUICtrlCreateRadio("8. Torkas", 20, 170, 121, 21)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("Channel", 170, 10, 150, 221)
    $radio9= GUICtrlCreateRadio("CH 1", 180, 30, 121, 21)
    $radio10= GUICtrlCreateRadio("CH 2", 180, 50, 121, 21)
    $radio11= GUICtrlCreateRadio("CH 3", 180, 70, 121, 21)
    $radio12= GUICtrlCreateRadio("CH 4", 180, 90, 121, 21)
    $radio13= GUICtrlCreateRadio("CH 5", 180, 110, 121, 21)
    $radio14= GUICtrlCreateRadio("CH 6", 180, 130, 121, 21)
    GUISetState(@SW_SHOW)

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

    While 1
    ControlClick ("Anmelden", "unsicht", "Button5")
    $nMsg = GUIGetMsg()
    Switch $nMsg

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

    Case $GUI_EVENT_CLOSE
    Exit
    Case $radio2
    GUICtrlSetState ( $radio14,$GUI_HIDE)

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

    EndSwitch
    WEnd

    [/autoit]
  • Herzlich Willkommen,

    vielleicht so ? Bin mir aber nicht sicher, ob nicht Checkboxen generell besser passen würden ?

    Spoiler anzeigen
    [autoit]


    #include <GUIConstants.au3>
    #NoTrayIcon

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

    $Form2 = GUICreate("Anmelden", 547, 546, 193, 125)
    $Group1 = GUICtrlCreateGroup("Server", 10, 10, 150, 221)
    $radio1 = GUICtrlCreateRadio("1. Mosha", 20, 30, 121, 21)
    $radio2 = GUICtrlCreateRadio("2. Karthago", 20, 50, 121, 21)
    $radio3 = GUICtrlCreateRadio("3. Astreya", 20, 70, 121, 21)
    $radio4 = GUICtrlCreateRadio("4. Hyperion", 20, 90, 121, 21)
    $radio5 = GUICtrlCreateRadio("5. Antharos", 20, 110, 121, 21)
    $radio6 = GUICtrlCreateRadio("6. Cascardon", 20, 130, 121, 21)
    $radio7 = GUICtrlCreateRadio("7. Lesanya", 20, 150, 121, 21)
    $radio8 = GUICtrlCreateRadio("8. Torkas", 20, 170, 121, 21)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("Channel", 170, 10, 150, 221)
    $radio9 = GUICtrlCreateRadio("CH 1", 180, 30, 121, 21)
    $radio10 = GUICtrlCreateRadio("CH 2", 180, 50, 121, 21)
    $radio11 = GUICtrlCreateRadio("CH 3", 180, 70, 121, 21)
    $radio12 = GUICtrlCreateRadio("CH 4", 180, 90, 121, 21)
    $radio13 = GUICtrlCreateRadio("CH 5", 180, 110, 121, 21)
    $radio14 = GUICtrlCreateRadio("CH 6", 180, 130, 121, 21)
    GUICtrlCreateGroup("", -99, -99, 1, 1);) vergessen !

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

    GUISetState(@SW_SHOW)

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

    While 1
    ControlClick("Anmelden", "unsicht", "Button5")
    $nMsg = GUIGetMsg()
    Switch $nMsg

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

    Case $GUI_EVENT_CLOSE
    Exit
    Case $radio2
    GUICtrlSetState($radio14, $GUI_DISABLE)

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

    EndSwitch
    WEnd

    [/autoit]


    Viel Erfolg ! 8)

  • Ui danke ihr beiden
    ES FUNKTIONIERT ENDLICH :thumbup:
    jetzt kann ich mir noch aussuchen ob ich die radios unsichtbar/unklickbar machen soll...
    aber des schaff ich^^
    jetzt noch des problem dass ich machen will dass er z.b. wenn $radio2 UND $radio13 gecheckt sind das und das macht und bei $radio2 UND $radio12 das und das

    mit

    [autoit]


    If $radio2 AND $radio12 then
    ;befehl
    Endif

    [/autoit]

    hauts net-.-

    wenn des noch funktioniert bin ich glücklich:D

    Edit1:
    Ach ja und mit checkboxen geht des net weil immer nur 1 server und 1 channel ausgewählt sein können
    trotzdem danke für den vorschlag

    Einmal editiert, zuletzt von Padmak (8. September 2008 um 17:03)

  • Hi,

    die Abfrage sollte so aussehen:

    Spoiler anzeigen
    [autoit]


    If BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($radio12), $GUI_CHECKED) = $GUI_CHECKED Then
    MsgBox(0, 'Super ', ' Es funktioniert ! ')
    EndIf

    [/autoit]

    Weiter zu Radios sollte einer voreingestellt sein, sie auch Hilfe:

    Spoiler anzeigen
    [autoit]


    #include <GUIConstants.au3>
    #NoTrayIcon

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

    $Form2 = GUICreate("Anmelden", 547, 546, 193, 125)
    $Group1 = GUICtrlCreateGroup("Server", 10, 10, 150, 221)
    $radio1 = GUICtrlCreateRadio("1. Mosha", 20, 30, 121, 21)
    GUICtrlSetState(-1, $GUI_CHECKED) ;) ein Radio sollte voreingestellt sein ! SIEHE HILFE GUICtrlCreateRadio
    $radio2 = GUICtrlCreateRadio("2. Karthago", 20, 50, 121, 21)
    $radio3 = GUICtrlCreateRadio("3. Astreya", 20, 70, 121, 21)
    $radio4 = GUICtrlCreateRadio("4. Hyperion", 20, 90, 121, 21)
    $radio5 = GUICtrlCreateRadio("5. Antharos", 20, 110, 121, 21)
    $radio6 = GUICtrlCreateRadio("6. Cascardon", 20, 130, 121, 21)
    $radio7 = GUICtrlCreateRadio("7. Lesanya", 20, 150, 121, 21)
    $radio8 = GUICtrlCreateRadio("8. Torkas", 20, 170, 121, 21)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("Channel", 170, 10, 150, 221)
    $radio9 = GUICtrlCreateRadio("CH 1", 180, 30, 121, 21)
    GUICtrlSetState(-1, $GUI_CHECKED) ;) ein Radio sollte voreingestellt sein ! SIEHE HILFE GUICtrlCreateRadio
    $radio10 = GUICtrlCreateRadio("CH 2", 180, 50, 121, 21)
    $radio11 = GUICtrlCreateRadio("CH 3", 180, 70, 121, 21)
    $radio12 = GUICtrlCreateRadio("CH 4", 180, 90, 121, 21)
    $radio13 = GUICtrlCreateRadio("CH 5", 180, 110, 121, 21)
    $radio14 = GUICtrlCreateRadio("CH 6", 180, 130, 121, 21)
    GUICtrlCreateGroup("", -99, -99, 1, 1);) nicht vergessen !

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

    GUISetState(@SW_SHOW)

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

    While 1
    ControlClick("Anmelden", "unsicht", "Button5")
    $nMsg = GUIGetMsg()
    Switch $nMsg

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

    Case $GUI_EVENT_CLOSE
    Exit
    Case $radio2
    GUICtrlSetState($radio14, $GUI_DISABLE)

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

    EndSwitch
    WEnd

    [/autoit]


    Schau Dir ruhig noch einmal die Hilfe zu "GUICtrlCreateRadio" genauer an. :rolleyes:
    Viel Erfolg ! ;)

  • Ui danke jetzt haut alles so wie ich will
    nur muss man alles ausprogrammieren oder?
    mein code sieht bis jez so aus:

    Spoiler anzeigen
    [autoit]


    #include <GUIConstants.au3>
    #NoTrayIcon

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

    $Form2 = GUICreate("Anmelden", 547, 546, 193, 125)
    $Group1 = GUICtrlCreateGroup("Server wählen", 10, 10, 150, 221)
    $radio1 = GUICtrlCreateRadio("1. Mosha", 20, 30, 121, 21)
    GUICtrlSetState(-1, $GUI_CHECKED) ;) ein Radio sollte voreingestellt sein ! SIEHE HILFE GUICtrlCreateRadio
    $radio2 = GUICtrlCreateRadio("2. Karthago", 20, 50, 121, 21)
    $radio3 = GUICtrlCreateRadio("3. Astreya", 20, 70, 121, 21)
    $radio4 = GUICtrlCreateRadio("4. Hyperion", 20, 90, 121, 21)
    $radio5 = GUICtrlCreateRadio("5. Antharos", 20, 110, 121, 21)
    $radio6 = GUICtrlCreateRadio("6. Cascardon", 20, 130, 121, 21)
    $radio7 = GUICtrlCreateRadio("7. Lesanya", 20, 150, 121, 21)
    $radio8 = GUICtrlCreateRadio("8. Torkas", 20, 170, 121, 21)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("Channel wählen", 170, 10, 150, 221)
    $channel1 = GUICtrlCreateRadio("CH 1", 180, 30, 121, 21)
    GUICtrlSetState(-1, $GUI_CHECKED) ;) ein Radio sollte voreingestellt sein ! SIEHE HILFE GUICtrlCreateRadio
    $channel2 = GUICtrlCreateRadio("CH 2", 180, 50, 121, 21)
    $channel3 = GUICtrlCreateRadio("CH 3", 180, 70, 121, 21)
    $channel4 = GUICtrlCreateRadio("CH 4", 180, 90, 121, 21)
    $channel5 = GUICtrlCreateRadio("CH 5", 180, 110, 121, 21)
    $channel6 = GUICtrlCreateRadio("CH 6", 180, 130, 121, 21)
    GUICtrlCreateGroup("", -99, -99, 1, 1);) nicht vergessen !
    $Button1 = GUICtrlCreateButton("Jetzt Anmelden", 350, 20, 160, 31, 0)
    $Button2 = GUICtrlCreateButton("Für Account registrieren", 350, 70, 160, 31, 0)
    $Button3 = GUICtrlCreateButton("Padmaks Website besuchen", 350, 120, 160, 31, 0)
    $Pic1 = GUICtrlCreatePic("C:\Users\Padmak\Documents\AutoIt\zoom.nebel.exe\padmak.jpg", 0, 340, 541, 201)
    $Button4 = GUICtrlCreateButton("Beenden", 350, 170, 160, 31, 0)
    $Label1 = GUICtrlCreateLabel("Benutzername:", 10, 240, 75, 17)
    $Input1 = GUICtrlCreateInput("", 10, 260, 100, 21)
    $Passwort = GUICtrlCreateLabel("Passwort", 10, 290, 47, 17)
    GUICtrlCreateInput("", 10, 310, 100, 21)
    $Label2 = GUICtrlCreateLabel("KEINE ANGST DIESE EINGABEN WERDEN", 120, 240, 414, 31)
    GUICtrlSetFont(-1, 14, 800, 4, "Comic Sans MS")
    GUICtrlSetColor(-1, 0xFF0000)
    $Label3 = GUICtrlCreateLabel("NICHT GESPEICHERT!!!!!!!!!!", 267, 278, 261, 31)
    GUICtrlSetFont(-1, 14, 800, 4, "Comic Sans MS")
    GUICtrlSetColor(-1, 0xFF0000)
    GUISetState(@SW_SHOW)

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

    While 1
    ControlClick ("Anmelden", "unsicht", "Button5")
    $nMsg = GUIGetMsg()
    Switch $nMsg

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

    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button4
    Exit
    Case $Button1
    call ("_anmelden")
    case $radio1
    GUICtrlSetState($channel5, $GUI_SHOW)
    GUICtrlSetState($channel6, $GUI_SHOW)
    case $radio2
    GUICtrlSetState($channel5, $GUI_SHOW)
    GUICtrlSetState($channel6, $GUI_HIDE)
    case $radio3
    GUICtrlSetState($channel5, $GUI_HIDE)
    GUICtrlSetState($channel6, $GUI_HIDE)
    case $radio4
    GUICtrlSetState($channel5, $GUI_HIDE)
    GUICtrlSetState($channel6, $GUI_HIDE)
    case $radio5
    GUICtrlSetState($channel5, $GUI_HIDE)
    GUICtrlSetState($channel6, $GUI_HIDE)
    case $radio6
    GUICtrlSetState($channel5, $GUI_HIDE)
    GUICtrlSetState($channel6, $GUI_HIDE)
    case $radio7
    GUICtrlSetState($channel5, $GUI_HIDE)
    GUICtrlSetState($channel6, $GUI_HIDE)
    case $radio8
    GUICtrlSetState($channel5, $GUI_HIDE)
    GUICtrlSetState($channel6, $GUI_HIDE)
    EndSwitch
    WEnd

    Func _anmelden()
    ;server 1
    If BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel1), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel2), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel3), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel4), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel5), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel6), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf

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

    ;server 2
    If BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel1), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel2), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel3), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel4), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel5), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf

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

    ;server 3
    If BitAND(GUICtrlRead($radio3), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel1), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio3), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel2), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio3), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel3), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio3), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel4), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf

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

    ;server 4
    If BitAND(GUICtrlRead($radio4), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel1), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio4), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel2), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio4), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel3), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio4), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel4), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf

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

    ;server 5
    If BitAND(GUICtrlRead($radio5), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel1), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio5), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel2), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio5), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel3), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio5), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel4), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf

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

    ;server 6
    If BitAND(GUICtrlRead($radio6), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel1), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio6), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel2), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio6), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel3), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio6), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel4), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf

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

    ;server 7
    If BitAND(GUICtrlRead($radio7), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel1), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio7), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel2), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio7), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel3), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio7), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel4), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf

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

    ;server 8
    If BitAND(GUICtrlRead($radio8), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel1), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio8), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel2), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio8), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel3), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    If BitAND(GUICtrlRead($radio8), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($channel4), $GUI_CHECKED) = $GUI_CHECKED Then
    ;funktion
    EndIf
    EndFunc

    [/autoit]

    anstelle von ;funktion kommt natürlich mein befehl hin:D
    aber es geht alles mehr will ich auch gar net :D

    DANKEDANKEDANKE an alle aus diesem board ihr seid die besten!!

    Padmak

    Edit1:
    ok ich hab noch ne frage: wie kann ich beim ersten programmstart die inhalte der inputs in ne datei data.ini schreiben und beim 2. (und bei allen darauf folgenden) das wieder hineinschreiben(in die inputs)? Ich krieg des net hin :D

    3 Mal editiert, zuletzt von Padmak (9. September 2008 um 16:11)

  • Danke schonmal BugFix

    aber kannst du mir dazu vllt ein beispiel geben? ich hab mich zwar bemüht arrays zu verstehen aber...
    iwie macht da mein hirn nicht mit :D

    Ich hab grad keinen plan wie ich des machen soll sorry...

    Bitte hilfe :D

    Ach ja was is mit den inputs? dafür hab ich auch noch keine lösung gefunden...

    Ach ja gibts ne möglichkeit der fertig kompilierten datei dann ein anderes icon zu geben? ich find des standardzeichen iwie hässlich :D :D

    Edit1: ok des mit dem icon hat sich erledigt...
    Edit2: ui ich bin richtig gut heute ich hab auch des mit den inputs :thumbup: :thumbup:
    ich versteh nur die arrays nicht^^
    Edit3^^: ehm BugFix geht des überhaupt mit arrays da jede funktion anders is?
    wenns geht gegen weniger schreibarbeit hab ich nix:-D und wenns net geht bin ich mit dem zufrieden wies jez is es funktioniert und mehr will ich gar net^^

    5 Mal editiert, zuletzt von Padmak (9. September 2008 um 16:41)

    • Offizieller Beitrag

    Hi, so könnte man das machen. 2-dimensionales Array, in Spalte 0 wird die ID der Controls gespeichert, in Spalte 1 der Name der auszuführenden Funktion.
    Ich habs mal an dein Skript angepaßt. Deine etwa 120 Zeilen lange Abfrage braucht jetzt keine 20 Zeilen mehr. :D

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>
    #NoTrayIcon

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

    Global $arRadio[14][2]
    $Form2 = GUICreate("Anmelden", 547, 546, 193, 125)
    $Group1 = GUICtrlCreateGroup("Server wählen", 10, 10, 150, 221)
    $arRadio[0][0] = GUICtrlCreateRadio("1. Mosha", 20, 30, 121, 21)
    GUICtrlSetState(-1, $GUI_CHECKED) ;) ein Radio sollte voreingestellt sein ! SIEHE HILFE GUICtrlCreateRadio
    $arRadio[1][0] = GUICtrlCreateRadio("2. Karthago", 20, 50, 121, 21)
    $arRadio[2][0] = GUICtrlCreateRadio("3. Astreya", 20, 70, 121, 21)
    $arRadio[3][0] = GUICtrlCreateRadio("4. Hyperion", 20, 90, 121, 21)
    $arRadio[4][0] = GUICtrlCreateRadio("5. Antharos", 20, 110, 121, 21)
    $arRadio[5][0] = GUICtrlCreateRadio("6. Cascardon", 20, 130, 121, 21)
    $arRadio[6][0] = GUICtrlCreateRadio("7. Lesanya", 20, 150, 121, 21)
    $arRadio[7][0] = GUICtrlCreateRadio("8. Torkas", 20, 170, 121, 21)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    $Group2 = GUICtrlCreateGroup("Channel wählen", 170, 10, 150, 221)
    $arRadio[8][0] = GUICtrlCreateRadio("CH 1", 180, 30, 121, 21)
    $arRadio[8][1] = 'CH_1' ; Funktion die ausgeführt werden soll
    GUICtrlSetState(-1, $GUI_CHECKED) ;) ein Radio sollte voreingestellt sein ! SIEHE HILFE GUICtrlCreateRadio
    $arRadio[9][0] = GUICtrlCreateRadio("CH 2", 180, 50, 121, 21)
    $arRadio[9][1] = 'CH_2'
    $arRadio[10][0] = GUICtrlCreateRadio("CH 3", 180, 70, 121, 21)
    $arRadio[10][1] = 'CH_3'
    $arRadio[11][0] = GUICtrlCreateRadio("CH 4", 180, 90, 121, 21)
    $arRadio[11][1] = 'CH_4'
    $arRadio[12][0] = GUICtrlCreateRadio("CH 5", 180, 110, 121, 21)
    $arRadio[12][1] = 'CH_5'
    $arRadio[13][0] = GUICtrlCreateRadio("CH 6", 180, 130, 121, 21)
    $arRadio[13][1] = 'CH_6'
    GUICtrlCreateGroup("", -99, -99, 1, 1);) nicht vergessen !
    $Button1 = GUICtrlCreateButton("Jetzt Anmelden", 350, 20, 160, 31, 0)
    $Button2 = GUICtrlCreateButton("Für Account registrieren", 350, 70, 160, 31, 0)
    $Button3 = GUICtrlCreateButton("Padmaks Website besuchen", 350, 120, 160, 31, 0)
    $Pic1 = GUICtrlCreatePic("C:\Users\Padmak\Documents\AutoIt\zoom.nebel.exe\padmak.jpg", 0, 340, 541, 201)
    $Button4 = GUICtrlCreateButton("Beenden", 350, 170, 160, 31, 0)
    $Label1 = GUICtrlCreateLabel("Benutzername:", 10, 240, 75, 17)
    $Input1 = GUICtrlCreateInput("", 10, 260, 100, 21)
    $Passwort = GUICtrlCreateLabel("Passwort", 10, 290, 47, 17)
    GUICtrlCreateInput("", 10, 310, 100, 21)
    $Label2 = GUICtrlCreateLabel("KEINE ANGST DIESE EINGABEN WERDEN", 120, 240, 414, 31)
    GUICtrlSetFont(-1, 14, 800, 4, "Comic Sans MS")
    GUICtrlSetColor(-1, 0xFF0000)
    $Label3 = GUICtrlCreateLabel("NICHT GESPEICHERT!!!!!!!!!!", 267, 278, 261, 31)
    GUICtrlSetFont(-1, 14, 800, 4, "Comic Sans MS")
    GUICtrlSetColor(-1, 0xFF0000)
    GUISetState(@SW_SHOW)

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

    While 1
    ControlClick ("Anmelden", "unsicht", "Button5")
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button4
    Exit
    Case $Button1
    ; call ("_anmelden") hier kannst du die Funktion mit Namen direkt aufrufen:
    _anmelden()
    EndSwitch
    For $i = 0 To 7
    If $msg = $arRadio[$i][0] Then
    GUICtrlSetState($arRadio[12][0], $GUI_HIDE)
    GUICtrlSetState($arRadio[13][0], $GUI_HIDE)
    EndIf
    Next
    WEnd

    Func _anmelden()
    ;server 1 und 2
    For $i = 0 To 1
    If BitAND(GUICtrlRead($arRadio[$i][0]), $GUI_CHECKED) = $GUI_CHECKED Then
    For $j = 8 To 12
    If BitAND(GUICtrlRead($arRadio[$j][0]), $GUI_CHECKED) = $GUI_CHECKED Then Call($arRadio[$j][1])
    Next
    EndIf
    Next
    ;server 3 bis 8
    For $i = 2 To 7
    If BitAND(GUICtrlRead($arRadio[$i][0]), $GUI_CHECKED) = $GUI_CHECKED Then
    For $j = 8 To 11
    If BitAND(GUICtrlRead($arRadio[$j][0]), $GUI_CHECKED) = $GUI_CHECKED Then Call($arRadio[$j][1])
    Next
    EndIf
    Next
    EndFunc

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

    Func CH_1()
    ; Code
    EndFunc

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

    Func CH_2()
    ; Code
    EndFunc

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

    Func CH_3()
    ; Code
    EndFunc

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

    Func CH_4()
    ; Code
    EndFunc

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

    Func CH_5()
    ; Code
    EndFunc

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

    Func CH_6()
    ; Code
    EndFunc

    [/autoit]
  • dankeschön BugFix

    OMFG is des kompliziert :D

    Ich glaub um des richtig hinbekommen zu können muss man echt King of Array sein ;)

    Iwie check ich arrays net...

    aber es funktioniert genau so wie du es gemacht hast dankeschööööön

    jez funzt alles^^

    Danke @alle in diesem Board ihr seid die besten!

    Padmak