ListView sortieren

  • Nabend ^^
    Hab da en Problem.

    Ich habe ein ListView, mit 4 Spalten.
    Nun will ich, dass sich der Inhalt des ListViews entsprechend der 3ten Spalte sortiert.
    Ich habs mit _GUICtrlListView_SimpleSort versucht, aber ich kapiers i.wie net so ganz.
    Die Hilfe mach das ganze leider nur noch kompliezierter.

    Könnt mir da einer bei helfen?
    Hier mal das Script:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #Include <GuiListView.au3>
    Global $SelDia

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

    #Region ### START Koda GUI section ### Form=
    $Form1_1 = GUICreate("Löschomat", 777, 447, 195, 126)
    GUISetFont(8, 800, 0, "MS Sans Serif")
    GUISetBkColor(0x878787)
    $ListView1 = GUICtrlCreateListView("Dateiname|Größ (KB)|Endung|Pfad", 0, 0, 605, 445)
    GUICtrlSendMsg(-1, 0x101E, 0, 200)
    GUICtrlSendMsg(-1, 0x101E, 1, 80)
    GUICtrlSendMsg(-1, 0x101E, 2, 70)
    GUICtrlSendMsg(-1, 0x101E, 3, 250)
    GUICtrlCreateGroup("Handlungen", 612, 4, 157, 189)
    GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
    $Button1 = GUICtrlCreateButton("Auswahl löschen", 620, 32, 143, 33)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Checkbox1 = GUICtrlCreateCheckbox("Löschanfrage ein/aus", 620, 168, 145, 17)
    GUICtrlSetState(-1, $GUI_CHECKED)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Button2 = GUICtrlCreateButton("Aktuallisieren", 620, 112, 143, 25)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Button3 = GUICtrlCreateButton("Ordner aufrufen", 620, 140, 143, 25)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button3
    _DirSelect ($ListView1, 0)
    Case $Button1
    $Read1 = GUICtrlRead ($Checkbox1)
    If $Read1 = $GUI_CHECKED Then
    $Ch = 1
    Else
    $Ch = 0
    EndIf
    _Delete ($ListView1, $Ch)
    Case $Button2
    _DirSelect ($ListView1, 1)
    EndSwitch
    WEnd

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

    Func _DirSelect ($Handle, $Update)
    If $Update = 0 Then
    $SelDia = FileSelectFolder ("Bitte wählen Sie einen Ordner aus.", "", 4)
    EndIf
    If Not @Error Then
    _GUICtrlListView_DeleteAllItems($Handle)
    $Search = FileFindFirstFile ($SelDia & "\*.*")
    $FileCount = DirGetSize ($SelDia, 1)
    For $i = 1 To $FileCount[1] Step 1
    $NextFile = FileFindNextFile ($Search)
    $Split = StringRight ($NextFile, 3)
    GUICtrlCreateListViewItem ($NextFile & "|" & Round (FileGetSize ($SelDia & "\" & $NextFile) /1024, 4) & "|" & $Split & "|" & $SelDia, $Handle)
    Next
    _GUICtrlListView_SimpleSort ($Handle, True, 3)
    EndIf
    EndFunc ;==> _DirSelect

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

    Func _Delete ($Handle, $Checked)
    $i1 = _GUICtrlListView_GetSelectedIndices ($Handle, True)
    $i2 = _GUICtrlListView_GetItem ($Handle, $i1[1], 0)
    $i3 = _GUICtrlListView_GetItem ($Handle, $i1[1], 2)
    If $Checked = 1 Then
    If MsgBox (4, "Wirklich löschen?", "Soll die folgende Datei wirklich gelöscht werden:" & @CRLF & $i3[3] & "\" & $i2[3]) = 6 Then
    FileDelete ($i3[3] & "\" & $i2[3])
    _GUICtrlListView_DeleteItemsSelected ($Handle)
    EndIf
    Else
    FileDelete ($i3[3] & "\" & $i2[3])
    _GUICtrlListView_DeleteItemsSelected ($Handle)
    EndIf
    EndFunc ;==> _Delete

    [/autoit]

    MfG

    • Offizieller Beitrag

    1. Für die UDF bitte das Handle des Listview und nicht die ID verwenden.
    2. Nach meiner Erfahrung ist die Verwendung von True/False als Parameter für Descending/Ascending fehlerhaft. Ich verwende dort die in der Hilfe angegebene Variante: Global $B_DESCENDING[_GUICtrlListView_GetColumnCount($hListView)]

  • Hallo,
    habe mir erlaubt, einiges auszubessern.

    Spoiler anzeigen
    [autoit]

    #include <Array.au3>
    #include <ListBoxConstants.au3>
    #include <GUIConstantsEx.au3>
    #Include <GuiListView.au3>
    Global $SelDia

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

    #Region ### START Koda GUI section ### Form=
    $Form1_1 = GUICreate("Löschomat", 777, 447, 195, 126)
    GUISetFont(8, 800, 0, "MS Sans Serif")
    GUISetBkColor(0x878787)
    $ListView1 = GUICtrlCreateListView("Dateiname|Größ (KB)|Endung|Pfad", 0, 0, 605, 445,$LBS_EXTENDEDSEL)
    GUICtrlSendMsg(-1, 0x101E, 0, 200)
    GUICtrlSendMsg(-1, 0x101E, 1, 80)
    GUICtrlSendMsg(-1, 0x101E, 2, 70)
    GUICtrlSendMsg(-1, 0x101E, 3, 250)
    GUICtrlCreateGroup("Handlungen", 612, 4, 157, 189)
    GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
    $Button1 = GUICtrlCreateButton("Auswahl löschen", 620, 32, 143, 33)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Checkbox1 = GUICtrlCreateCheckbox("Löschanfrage ein/aus", 620, 168, 145, 17)
    GUICtrlSetState(-1, $GUI_CHECKED)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Button2 = GUICtrlCreateButton("Aktuallisieren", 620, 112, 143, 25)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Button3 = GUICtrlCreateButton("Ordner aufrufen", 620, 140, 143, 25)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button3
    _DirSelect ($ListView1, 0)
    Case $Button1
    $Read1 = GUICtrlRead ($Checkbox1)
    If $Read1 = $GUI_CHECKED Then
    $Ch = 1
    Else
    $Ch = 0
    EndIf
    _Delete ($ListView1, $Ch)
    Case $Button2
    _DirSelect ($ListView1, 1)
    EndSwitch
    WEnd

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

    Func _DirSelect ($Handle, $Update)
    If $Update = 0 Then
    $SelDia = FileSelectFolder ("Bitte wählen Sie einen Ordner aus.", "", 4)
    EndIf
    If Not @Error Then
    _GUICtrlListView_DeleteAllItems($Handle)
    $Search = FileFindFirstFile ($SelDia & "\*.*")
    $FileCount = DirGetSize ($SelDia, 3)
    ;_arraydisplay($filecount)
    For $i = 1 To $FileCount[1] Step 1
    $NextFile = FileFindNextFile ($Search)
    $attribute=FileGetAttrib ($seldia&"\"&$nextfile) ;dateiattribut
    If @error Then
    MsgBox(4096,"Error", "Konnte die Attribute nicht auslesen.")
    Exit
    endif
    if stringinstr($attribute,"D")<>0 then ;wenn unterverzeichnis
    $split="<DIR>"
    $size=round(DirGetSize ($seldia&"\"&$nextfile)/1024) ;größe in kilobyte incl unterverzeichnissen
    else
    if stringinstr($nextfile,".")<>0 then ;wenn "." im dateinamen...
    $split= Stringtrimleft ($NextFile, stringinstr($nextfile,".",0,-1)) ;...dann endung ausgeben
    else
    $split="" ;...hat keine dateiendung
    EndIf
    $size=Round (FileGetSize ($SelDia & "\" & $NextFile) /1024) ;dateigröße
    endif

    GUICtrlCreateListViewItem ($NextFile & "|" & $size & "|" & $Split & "|" & $SelDia, $Handle)
    Next
    $trueorfalse=False
    _GUICtrlListView_SimpleSort ($Handle, $trueorfalse, _GUICtrlListView_GetColumnCount($listview1))
    EndIf
    EndFunc ;==> _DirSelect

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

    Func _Delete ($Handle, $Checked)
    $i1 = _GUICtrlListView_GetSelectedIndices ($Handle, True)
    ;_arraydisplay($i1)
    $i2 = _GUICtrlListView_GetItem ($Handle, $i1[1], 0)
    $dateiname=$i2[3]
    $i3 = _GUICtrlListView_GetItem ($Handle, $i1[1], 3)
    $pfad=$i3[3]
    $delfile=$pfad&"\"&$dateiname
    If $Checked = 1 Then
    If MsgBox (4, "Wirklich löschen?", "Soll die folgende Datei wirklich gelöscht werden:" & @CRLF &$delfile) = 6 Then
    FileDelete ($delfile)
    _GUICtrlListView_DeleteItemsSelected ($Handle)
    EndIf
    Else
    FileDelete ($delfile)
    _GUICtrlListView_DeleteItemsSelected ($Handle)
    endif
    EndFunc ;==> _Delete

    [/autoit]


    Auswahl auch mehrerer Dateien mit Shift- bzw- Ctrl-Mausklick

    ciao
    Andy


    "Schlechtes Benehmen halten die Leute doch nur deswegen für eine Art Vorrecht, weil keiner ihnen aufs Maul haut." Klaus Kinski
    "Hint: Write comments after each line. So you can (better) see what your program does and what it not does. And we can see what you're thinking what your program does and we can point to the missunderstandings." A-Jay

    Wie man Fragen richtig stellt... Tutorial: Wie man Script-Fehler findet und beseitigt...X-Y-Problem

    Einmal editiert, zuletzt von Andy (24. Juni 2009 um 11:54)

  • Mal ne Blöde Frage:
    Warum wird die Funktion _GUICtrlListView_SortItems eigl. nirgends in der hilfe angezeigt?
    War das mal in ner früheren Version?
    Weil wenn das Script an die funktion kommt, bekomme ich so ne Meldung, wo ich nen Bericht an Microsoft senden soll...

    PS: Also tut mir leid, aber ich kapier das einfach net mit dem _GUICtrlListView_SimpleSort
    Könnt mir das vllt jmd so einbauen, dass es geht?

    PPS: Andy: Thx für die Änderung, aber ich würd es gern so lassen wie es ist ^^

    Einmal editiert, zuletzt von Commander21 (24. Juni 2009 um 13:27)

    • Offizieller Beitrag

    Warum wird die Funktion _GUICtrlListView_SortItems eigl. nirgends in der hilfe angezeigt?


    Also in meiner Hilfe (AutoIt 3.3.0.0) steht es drin. :D

    Edit:

    Hier mal die Lösung:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #Include <GuiListView.au3>
    Global $SelDia
    Global $bDesc = True ; <== Sortparameter ist ByRef, muß vorab deklariert werden

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

    #Region ### START Koda GUI section ### Form=
    $Form1_1 = GUICreate("Löschomat", 777, 447, 195, 126)
    GUISetFont(8, 800, 0, "MS Sans Serif")
    GUISetBkColor(0x878787)
    $ListView1 = GUICtrlCreateListView("Dateiname|Größ (KB)|Endung|Pfad", 0, 0, 605, 445)
    GUICtrlSendMsg(-1, 0x101E, 0, 200)
    GUICtrlSendMsg(-1, 0x101E, 1, 80)
    GUICtrlSendMsg(-1, 0x101E, 2, 70)
    GUICtrlSendMsg(-1, 0x101E, 3, 250)
    GUICtrlCreateGroup("Handlungen", 612, 4, 157, 189)
    GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
    $Button1 = GUICtrlCreateButton("Auswahl löschen", 620, 32, 143, 33)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Checkbox1 = GUICtrlCreateCheckbox("Löschanfrage ein/aus", 620, 168, 145, 17)
    GUICtrlSetState(-1, $GUI_CHECKED)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Button2 = GUICtrlCreateButton("Aktuallisieren", 620, 112, 143, 25)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Button3 = GUICtrlCreateButton("Ordner aufrufen", 620, 140, 143, 25)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button3
    _DirSelect ($ListView1, 0)
    Case $Button1
    $Read1 = GUICtrlRead ($Checkbox1)
    If $Read1 = $GUI_CHECKED Then
    $Ch = 1
    Else
    $Ch = 0
    EndIf
    _Delete ($ListView1, $Ch)
    Case $Button2
    _DirSelect ($ListView1, 1)
    EndSwitch
    WEnd

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

    Func _DirSelect ($Handle, $Update)
    $hLV = GUICtrlGetHandle($Handle)
    If $Update = 0 Then
    $SelDia = FileSelectFolder ("Bitte wählen Sie einen Ordner aus.", "", 4)
    EndIf
    If Not @Error Then
    _GUICtrlListView_DeleteAllItems($hLV)
    $Search = FileFindFirstFile ($SelDia & "\*.*")
    $FileCount = DirGetSize ($SelDia, 1)
    For $i = 1 To $FileCount[1] Step 1
    $NextFile = FileFindNextFile ($Search)
    $Split = StringRight ($NextFile, 3)
    GUICtrlCreateListViewItem ($NextFile & "|" & Round (FileGetSize ($SelDia & "\" & $NextFile) /1024, 4) & "|" & $Split & "|" & $SelDia, $Handle)
    Next
    _GUICtrlListView_SimpleSort ($hLV, $bDesc, 3)
    EndIf
    EndFunc ;==> _DirSelect

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

    Func _Delete ($Handle, $Checked)
    $hLV = GUICtrlGetHandle($Handle)
    $i1 = _GUICtrlListView_GetSelectedIndices ($hLV, True)
    $i2 = _GUICtrlListView_GetItem ($hLV, $i1[1], 0)
    $i3 = _GUICtrlListView_GetItem ($hLV, $i1[1], 2)
    If $Checked = 1 Then
    If MsgBox (4, "Wirklich löschen?", "Soll die folgende Datei wirklich gelöscht werden:" & @CRLF & $i3[3] & "\" & $i2[3]) = 6 Then
    FileDelete ($i3[3] & "\" & $i2[3])
    _GUICtrlListView_DeleteItemsSelected ($hLV)
    EndIf
    Else
    FileDelete ($i3[3] & "\" & $i2[3])
    _GUICtrlListView_DeleteItemsSelected ($hLV)
    EndIf
    EndFunc ;==> _Delete

    [/autoit]
  • ...oder mittels Sortierung per Spaltenüberschriften und Icons^^

    Spoiler anzeigen
    [autoit]

    #include <ListViewConstants.au3>
    #include <WindowsConstants.au3>
    #include <GuiImageList.au3>
    #include <Array.au3>
    #include <ListBoxConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GuiListView.au3>
    Global $SelDia
    Local $aIcons[4] = [0, 3, 6, 9]

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

    Local $iExWindowStyle = BitOR($WS_EX_DLGMODALFRAME, $WS_EX_CLIENTEDGE)
    Local $iExListViewStyle = BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES, $LVS_EX_GRIDLINES, $LVS_EX_CHECKBOXES, $LVS_EX_DOUBLEBUFFER)

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

    #Region ### START Koda GUI section ### Form=
    $Form1_1 = GUICreate("Löschomat", 777, 447, 195, 126)
    GUISetFont(8, 800, 0, "MS Sans Serif")
    GUISetBkColor(0x878787)
    $ListView1 = GUICtrlCreateListView("Dateiname|Größ (KB)|Endung|Pfad", 0, 0, 605, 445, $LBS_EXTENDEDSEL, $iExListViewStyle)

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

    GUICtrlSendMsg(-1, 0x101E, 0, 200)
    GUICtrlSendMsg(-1, 0x101E, 1, 80)
    GUICtrlSendMsg(-1, 0x101E, 2, 70)
    GUICtrlSendMsg(-1, 0x101E, 3, 250)

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

    GUICtrlCreateGroup("Handlungen", 612, 4, 157, 189)
    GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
    $Button1 = GUICtrlCreateButton("Auswahl löschen", 620, 32, 143, 33)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Checkbox1 = GUICtrlCreateCheckbox("Löschanfrage ein/aus", 620, 168, 145, 17)
    GUICtrlSetState(-1, $GUI_CHECKED)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Button2 = GUICtrlCreateButton("Aktuallisieren", 620, 112, 143, 25)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Button3 = GUICtrlCreateButton("Ordner aufrufen", 620, 140, 143, 25)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    _GUICtrlListView_SetExtendedListViewStyle($ListView1, $iExListViewStyle)
    $hImage = _GUIImageList_Create(18, 18, 5, 3)
    _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", -5) ;Das sind die Icons für die files
    _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", -3)
    _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", -5)
    _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", -6)
    _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", -9)
    _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", -10)
    _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", -11)
    _GUICtrlListView_SetImageList($ListView1, $hImage, 1)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    ExitLoop
    Case $Button3
    _DirSelect($ListView1, 0)
    Case $Button1
    $Read1 = GUICtrlRead($Checkbox1)
    If $Read1 = $GUI_CHECKED Then
    $Ch = 1
    Else
    $Ch = 0
    EndIf
    _Delete($ListView1, $Ch)
    Case $Button2
    _DirSelect($ListView1, 1)
    Case $ListView1
    ; Kick off the sort callback
    _GUICtrlListView_SortItems($ListView1, GUICtrlGetState($ListView1))
    EndSwitch
    WEnd
    _GUICtrlListView_UnRegisterSortCallBack($ListView1)
    GUIDelete()
    Exit

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

    Func _DirSelect($Handle, $Update)
    If $Update = 0 Then
    $SelDia = FileSelectFolder("Bitte wählen Sie einen Ordner aus.", "", 4)
    EndIf
    If Not @error Then
    _GUICtrlListView_DeleteAllItems($Handle)
    $Search = FileFindFirstFile($SelDia & "\*.*")
    $FileCount = DirGetSize($SelDia, 3)
    ;_arraydisplay($filecount)
    For $i = 1 To $FileCount[1] Step 1
    $NextFile = FileFindNextFile($Search)
    $attribute = FileGetAttrib($SelDia & "\" & $NextFile) ;dateiattribut
    If @error Then
    MsgBox(4096, "Error", "Konnte die Attribute nicht auslesen.")
    Exit
    EndIf
    If StringInStr($attribute, "D") <> 0 Then ;wenn unterverzeichnis
    $split = "<DIR>"
    $size = Round(DirGetSize($SelDia & "\" & $NextFile) / 1024) ;größe in kilobyte incl unterverzeichnissen
    $filename = $NextFile
    $fileicon = 0 ;das erste icon in der iconliste

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

    Else
    If StringInStr($NextFile, ".") <> 0 Then ;wenn "." im dateinamen...
    $split = StringTrimLeft($NextFile, StringInStr($NextFile, ".", 0, -1)) ;...dann endung ausgeben
    $filename = StringTrimRight($NextFile, StringLen($split) + 1)

    Else
    $split = "" ;...hat keine dateiendung
    $filename = $NextFile

    EndIf
    $fileicon = 1
    $size = Round(FileGetSize($SelDia & "\" & $NextFile) / 1024) ;dateigröße
    EndIf

    _AddRow($ListView1, $filename & "|" & $size & "|" & $split & "|" & $SelDia, $fileicon)
    ;GUICtrlCreateListViewItem ($filename & "|" & $size & "|" & $Split & "|" & $SelDia, $Handle)
    Next
    _GUICtrlListView_RegisterSortCallBack($ListView1, True, False)
    ;_GUICtrlListView_SimpleSort ($Handle, $trueorfalse, _GUICtrlListView_GetColumnCount($listview1))
    EndIf
    EndFunc ;==>_DirSelect

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

    Func _Delete($Handle, $Checked)
    $i1 = _GUICtrlListView_GetSelectedIndices($Handle, True)
    $i2 = _GUICtrlListView_GetItem($Handle, $i1[1], 0)
    $dateiname = $i2[3]
    $i3 = _GUICtrlListView_GetItem($Handle, $i1[1], 3)
    $pfad = $i3[3]
    $delfile = $pfad & "\" & $dateiname
    If $Checked = 1 Then
    If MsgBox(4, "Wirklich löschen?", "Soll die folgende Datei wirklich gelöscht werden:" & @CRLF & $delfile) = 6 Then
    FileDelete($delfile)
    _GUICtrlListView_DeleteItemsSelected($Handle)
    EndIf
    Else
    FileDelete($delfile)
    _GUICtrlListView_DeleteItemsSelected($Handle)
    EndIf
    EndFunc ;==>_Delete

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

    Func _AddRow($hWnd, $sItem, $ifile)
    Local $aItem = StringSplit($sItem, "|")
    Local $iIndex = _GUICtrlListView_AddItem($hWnd, $aItem[1], $ifile, _GUICtrlListView_GetItemCount($hWnd) + 9999)
    For $x = 2 To $aItem[0]
    _GUICtrlListView_AddSubItem($hWnd, $iIndex, $aItem[$x], $x - 1)
    Next
    EndFunc ;==>_AddRow

    [/autoit]
  • Ich hab die 3.3.0.0 Hilfe, und bei mir stehts net drin. Weder unter Index noch unter suchen...
    Aber egal, es klappt auf jeden fall, thx ^^