Switch + Neues Fenster + Komplettes auslesen Unbekannter Variablen in einer LISTVIEW

  • Hey Leute, wie mache ich ne SWITCH Funktion in dieser Combo Box, dass ne MSG erscheint:

    [autoit]


    #include <ComboConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 633, 447, 192, 124)
    $Combo1 = GUICtrlCreateCombo("Combo1", 244, 52, 145, 25)
    GUICtrlSetData(-1, "1|2|3|A|B|C")
    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]

    EDIT//
    Switch hat sich erledigt !!!

    2. Ich habe jetzt die Combo Box, und je nachdem was man darin auswählt, soll sich ein neues Fenster öffnen:

    [autoit]


    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 633, 447, 192, 124)
    $Button1 = GUICtrlCreateButton("Button1", 208, 156, 75, 25, $WS_GROUP)
    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]

    (ratlos :()

    3. Ich habe eine ListView erstellt und dort kann man werte eintragen... jetzt soll aber auf Button 2 das ganze ausgelesen werden, also das eine...
    Zudem sollte man z.B. bei C eine Zahl reinschreiben, und dort soll dann die MSGBOX so oft wie die Zahl des einzelnen ITEMS ist abgrufen werden: (also, meinetwegen in C steht 3, dann kommt 3 mal eine MSG BOX)

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

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ListViewConstants.au3>
    #include <WindowsConstants.au3>
    Global $Zahl = 0
    #Region ### START Koda GUI section ### Form=
    $Form1_1 = GUICreate("Form1", 339, 261, 192, 124)
    $ListView1 = GUICtrlCreateListView("A|B|C|", 72, 60, 230, 150)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 75)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 75)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 75)
    $Button1 = GUICtrlCreateButton("Button1", 144, 216, 75, 25, $WS_GROUP)
    $Button2 = GUICtrlCreateButton("Button2", 136, 32, 75, 25, $WS_GROUP)
    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]

    Case $Button1
    $A = InputBox("A", "A")
    $B = InputBox("B", "B")
    $C = InputBox("C", "C")
    GUICtrlCreateListViewItem($A&"|"&$B&"|"&$C, $ListView1)

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

    Case $Button2

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

    EndSwitch
    WEnd

    [/autoit]

    Es gibt sehr viele Leute, die glauben. Aber aus Aberglauben.
    - Blaise Pascal

    Einmal editiert, zuletzt von EliteMattthias (12. April 2010 um 13:38)

  • zu 2.:
    Ich sehe da keine ComboBox.

    zu 3.:
    So eventuell?

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #Include <GuiListView.au3>
    #include <ListViewConstants.au3>
    #include <WindowsConstants.au3>

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

    Global $Zahl = 0

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

    $Form1_1 = GUICreate("Form1", 339, 261, 192, 124)
    $ListView1 = GUICtrlCreateListView("A|B|C|", 72, 60, 230, 150)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 75)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 75)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 75)
    $Button1 = GUICtrlCreateButton("Button1", 144, 216, 75, 25, $WS_GROUP)
    $Button2 = GUICtrlCreateButton("Button2", 136, 32, 75, 25, $WS_GROUP)
    GUISetState()

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

    While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    $A = InputBox("A", "A")
    $B = InputBox("B", "B")
    $C = InputBox("C", "C")
    GUICtrlCreateListViewItem($A & "|" & $B & "|" & $C, $ListView1)
    Case $Button2
    $iCountColumn = _GUICtrlListView_GetColumnCount($ListView1) ; Anzahl der Spalten
    $iCountRow = _GUICtrlListView_GetItemCount($ListView1) ; Anzahl der Zeilen
    For $i = 0 To $iCountRow - 1
    For $k = 0 To $iCountColumn - 1
    $sText = _GUICtrlListView_GetItemText($ListView1, $i, $k)
    For $m = 1 To Int($sText)
    MsgBox(0, "Test", "Zeile: " & $i + 1 & @CRLF & _
    "Spalte: " & $k + 1 & @CRLF & _
    "MsgBox: " & $m & " von " & $sText)
    Next
    Next
    Next
    EndSwitch
    WEnd

    [/autoit]