Dateibeschreibung?

  • Spoiler anzeigen
    [autoit]

    #include <GuiListView.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <File.au3>
    #include <ListViewConstants.au3>

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

    $path = "C:"

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

    $Form1 = GUICreate("Test", 389, 298, 192, 124)
    $ListView1 = _GUICtrlListView_Create($Form1, "|Beschreibung|DLL Name", 4, 4, 306, 290)
    _GUICtrlListView_SetExtendedListViewStyle($ListView1, BitOr($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES, $LVS_EX_CHECKBOXES))
    _GUICtrlListView_SetColumnWidth($ListView1, 0, 25)
    _GUICtrlListView_SetColumnWidth($ListView1, 1, 132)
    _GUICtrlListView_SetColumnWidth($ListView1, 2, 132)
    $Icon1 = GUICtrlCreateIcon("0.ico", 0, 320, 16, 64, 64, BitOR($SS_NOTIFY,$WS_GROUP))
    GUICtrlSetCursor($Icon1, 0)
    $Icon2 = GUICtrlCreateIcon("1.ico", 0, 320, 84, 64, 64, BitOR($SS_NOTIFY,$WS_GROUP))
    GUICtrlSetCursor($Icon2, 0)
    $Icon3 = GUICtrlCreateIcon("3.ico", 0, 320, 152, 64, 64, BitOR($SS_NOTIFY,$WS_GROUP))
    GUICtrlSetCursor($Icon3, 0)
    $Icon4 = GUICtrlCreateIcon("4.ico", 0, 320, 220, 64, 64, BitOR($SS_NOTIFY,$WS_GROUP))
    GUICtrlSetCursor($Icon4, 0)
    GUISetState()

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

    load()

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Icon4
    load()
    EndSwitch
    WEnd

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

    Func load()
    $filearray = _FileListToArray($path & "\dlls", "*.dll", 1)
    For $i = 1 to $filearray[0] - 1
    _GUICtrlListView_AddItem($ListView1, "")
    $v = FileGetVersion($filearray[$i]) ;Hab schon diverse andere versucht...
    _GUICtrlListView_AddSubItem($ListView1, $i - 1, $v, 1)
    _GUICtrlListView_AddSubItem($ListView1, $i - 1, $filearray[$i], 2)
    Next
    EndFunc

    [/autoit]

    Einmal editiert, zuletzt von Carsten8 (7. November 2008 um 21:20)

  • Geht doch mit FileDescription :)

    Spoiler anzeigen
    [autoit]

    #include <GuiListView.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <File.au3>
    #include <ListViewConstants.au3>

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

    $Form1 = GUICreate("Test", 389, 298, 192, 124)
    $ListView1 = _GUICtrlListView_Create($Form1, "|Beschreibung|DLL Name", 4, 4, 306, 290)
    _GUICtrlListView_SetExtendedListViewStyle($ListView1, BitOr($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES, $LVS_EX_CHECKBOXES))
    _GUICtrlListView_SetColumnWidth($ListView1, 0, 25)
    _GUICtrlListView_SetColumnWidth($ListView1, 1, 132)
    _GUICtrlListView_SetColumnWidth($ListView1, 2, 132)
    $Icon1 = GUICtrlCreateIcon("0.ico", 0, 320, 16, 64, 64, BitOR($SS_NOTIFY,$WS_GROUP))
    GUICtrlSetCursor($Icon1, 0)
    $Icon2 = GUICtrlCreateIcon("1.ico", 0, 320, 84, 64, 64, BitOR($SS_NOTIFY,$WS_GROUP))
    GUICtrlSetCursor($Icon2, 0)
    $Icon3 = GUICtrlCreateIcon("3.ico", 0, 320, 152, 64, 64, BitOR($SS_NOTIFY,$WS_GROUP))
    GUICtrlSetCursor($Icon3, 0)
    $Icon4 = GUICtrlCreateIcon("4.ico", 0, 320, 220, 64, 64, BitOR($SS_NOTIFY,$WS_GROUP))
    GUICtrlSetCursor($Icon4, 0)
    GUISetState()

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

    load()

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Icon4
    load()
    EndSwitch
    WEnd

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

    Func load()
    $filearray = _FileListToArray(@SystemDir, "*.dll", 1) ;geändert ... ###################################
    If @error Then Exit MsgBox(0, "Fehler!", "Keine Effekte gefunden.")
    _GUICtrlListView_BeginUpdate($ListView1)
    For $i = 1 to $filearray[0] - 1
    _GUICtrlListView_AddItem($ListView1, "")
    $v = FileGetVersion($filearray[$i],"FileDescription") ; das geht :)
    _GUICtrlListView_AddSubItem($ListView1, $i - 1, $v, 1)
    _GUICtrlListView_AddSubItem($ListView1, $i - 1, $filearray[$i], 2)
    If $i = 200 Then ExitLoop ;################################################
    Next
    _GUICtrlListView_EndUpdate($ListView1)
    EndFunc

    [/autoit]