Ordner Read

  • Ich habe das folgende Script vom Englischen Forum aber da wird das Programm dann beendet, wenn ich auf einen Ordner klicke.
    Kann mit jemand helfen?
    Hat schon jemand anders sowas gemacht?

    Hier das Script:

    Spoiler anzeigen
    [autoit]

    #include <GuiImageList.au3>
    #include <GUIListView.au3>

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

    #include <GUIConstantsEx.au3>
    #include <ListViewConstants.au3>
    #include <EditConstants.au3>
    #include <WindowsConstants.au3>

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

    Global Const $tagSHFILEINFO = "dword hIcon; int iIcon; DWORD dwAttributes; CHAR szDisplayName[255]; CHAR szTypeName[80];"
    Global Const $SHGFI_USEFILEATTRIBUTES = 0x10
    Global Const $SHGFI_SYSICONINDEX = 0x4000
    Global Const $FILE_ATTRIBUTE_NORMAL = 0x80
    Global Const $SHGFI_SMALLICON = 0x1
    Global Const $SHGFI_LARGEICON = 0x0

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

    Global Const $FOLDER_ICON_INDEX = _GUIImageList_GetFileIconIndex(@SystemDir, 0, 1)
    Global Const $NOICON_ICON_INDEX = _GUIImageList_GetFileIconIndex("nb lgl", 0, 0)

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

    Opt("GUIOnEventMode", 1)
    #Region ### START Koda GUI section ### Form=D:\Dokumente\Dateien von Andreas\AutoIt3\FTP\GUI_MAIN.kxf
    Global $GUI_MAIN = GUICreate("Au3FTP", 882, 586, 193, 125)
    GUISetOnEvent(-3,"GUI_Close")

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

    Global $inpLocalDirectory = GUICtrlCreateInput("", 8, 28, 369, 20, $ES_READONLY)
    Global $ListView1 = GUICtrlCreateListView("Name|Datum|Größe", 8, 48, 369, 489)

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

    Global $SHELLLISTVIEWHANDLE = GUICtrlGetHandle($ListView1) ; Get the Handle

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

    GUICtrlSendMsg($ListView1, 0x101E, 0, 200)
    GUICtrlSendMsg($ListView1, 0x101E, 1, 75)
    GUICtrlSendMsg($ListView1, 0x101E, 2, 50)
    GUIRegisterMsg($WM_NOTIFY, "_SHLV_WM_NOTIFY")

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

    _GUICtrlListView_SetImageList($ListView1, _GUIImageList_GetSystemImageList(), 1)
    Global $DIRECTORY_LOCAL = "" ; Start with Selection of drives (IMG:http://www.autoitscript.com/forum/style_em…utoit/smile.gif)
    _SHLV_PopulateLocalListView($SHELLLISTVIEWHANDLE,$DIRECTORY_LOCAL)

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

    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    Sleep(100)
    WEnd

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

    Func GUI_Close()
    Exit
    EndFunc

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

    ; Prog@ndy
    Func _SHLV_PopulateLocalListView($hListView1,ByRef $DIRECTORY_LOCAL)
    If $DIRECTORY_LOCAL = "" Then
    Local $drives = DriveGetDrive("ALL")
    GUICtrlSetData($inpLocalDirectory, "Drive Selection")
    _GUICtrlListView_BeginUpdate($hListView1)
    _GUICtrlListView_DeleteAllItems($hListView1)
    For $i = 1 To $drives[0]
    _GUICtrlListView_AddItem($hListView1, StringUpper($drives[$i]) & "\", _GUIImageList_GetFileIconIndex($drives[$i] & "\"))
    Next
    _GUICtrlListView_EndUpdate($hListView1)
    Return
    EndIf
    If StringRight($DIRECTORY_LOCAL, 1) <> "\" Then $DIRECTORY_LOCAL &= "\"
    If DriveStatus(StringLeft($DIRECTORY_LOCAL, 3)) <> "READY" Then Return 0 * MsgBox(16 + 8192, 'Error on Drive Access', "Drive " & StringLeft($DIRECTORY_LOCAL, 3) & " not ready!")
    GUICtrlSetData($inpLocalDirectory, $DIRECTORY_LOCAL)
    $files = _SHLV__FileListToArray2($DIRECTORY_LOCAL, "*.*", 2)
    _GUICtrlListView_BeginUpdate($hListView1)
    _GUICtrlListView_DeleteAllItems($hListView1)
    _GUICtrlListView_SetItemCount($hListView1,$files[0])
    _GUICtrlListView_AddItem($hListView1, "[..]", 1)
    If IsArray($files) Then
    For $i = 1 To $files[0]
    $item = _GUICtrlListView_AddItem($hListView1, $files[$i], $FOLDER_ICON_INDEX)
    _GUICtrlListView_AddSubItem($hListView1, $item, __SHLV_FormatFilesize(DirGetSize($DIRECTORY_LOCAL & $files[$i], 2)), 2)
    Next
    EndIf
    Local $foldercount
    $files = _SHLV__FileListToArray2($DIRECTORY_LOCAL, "*.*", 1)
    _GUICtrlListView_EndUpdate($hListView1)
    _GUICtrlListView_BeginUpdate($hListView1)
    _GUICtrlListView_SetItemCount($hListView1,$files[0]+$foldercount)
    If IsArray($files) Then
    For $i = 1 To $files[0]
    $item = _GUICtrlListView_AddItem($hListView1, $files[$i], _GUIImageList_GetFileIconIndex($files[$i]))
    _GUICtrlListView_AddSubItem($hListView1, $item, __SHLV_FileDateString2Calc(FileGetTime($DIRECTORY_LOCAL & $files[$i], 0, 1)), 1)
    _GUICtrlListView_AddSubItem($hListView1, $item, __SHLV_FormatFilesize(FileGetSize($DIRECTORY_LOCAL & $files[$i])), 2)
    Next
    EndIf
    _GUICtrlListView_EndUpdate($hListView1)
    EndFunc ;==>_SHLV_PopulateLocalListView

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

    ; Prog@ndy
    Func __SHLV_FormatFilesize($size)
    Select
    Case $size > 1000
    Return Round($size / 1024, 1) & " KB"
    Case $size > 1048500
    Return Round($size / 1048576, 1) & " MB"
    Case Else
    Return $size & " Byte"
    EndSelect
    EndFunc ;==>_FormatFilesize

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

    ; Prog@ndy
    Func _GUIImageList_GetSystemImageList($bLargeIcons = False)
    Local $dwFlags, $hIml, $FileInfo = DllStructCreate($tagSHFILEINFO)

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

    $dwFlags = BitOR($SHGFI_USEFILEATTRIBUTES, $SHGFI_SYSICONINDEX)
    If Not ($bLargeIcons) Then
    $dwFlags = BitOR($dwFlags, $SHGFI_SMALLICON)
    EndIf

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

    ;~ '// Load the image list - use an arbitrary file extension for the
    ;~ '// call to SHGetFileInfo (we don't want to touch the disk, so use
    ;~ '// FILE_ATTRIBUTE_NORMAL && SHGFI_USEFILEATTRIBUTES).
    $hIml = _WinAPI_SHGetFileInfo(".txt", $FILE_ATTRIBUTE_NORMAL, _
    DllStructGetPtr($FileInfo), DllStructGetSize($FileInfo), $dwFlags)

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

    Return $hIml
    EndFunc ;==>_GUIImageList_GetSystemImageList

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

    ; Prog@ndy
    Func _WinAPI_SHGetFileInfo($pszPath, $dwFileAttributes, $psfi, $cbFileInfo, $uFlags)
    Local $return = DllCall("shell32.dll", "DWORD*", "SHGetFileInfo", "str", $pszPath, "DWORD", $dwFileAttributes, "ptr", $psfi, "UINT", $cbFileInfo, "UINT", $uFlags)
    If @error Then Return SetError(@error, 0, 0)
    Return $return[0]
    EndFunc ;==>_WinAPI_SHGetFileInfo

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

    ; Prog@ndy
    Func _GUIImageList_GetFileIconIndex($sFileSpec, $bLargeIcons = False, $bForceLoadFromDisk = False)
    Local $dwFlags, $FileInfo = DllStructCreate($tagSHFILEINFO)

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

    $dwFlags = $SHGFI_SYSICONINDEX
    If $bLargeIcons Then
    $dwFlags = BitOR($dwFlags, $SHGFI_LARGEICON)
    Else
    $dwFlags = BitOR($dwFlags, $SHGFI_SMALLICON)
    EndIf
    ;~ ' We choose whether to access the disk or not. If you don't
    ;~ ' hit the disk, you may get the wrong icon if the icon is
    ;~ ' not cached. But the speed is very good!
    If Not $bForceLoadFromDisk Then
    $dwFlags = BitOR($dwFlags, $SHGFI_USEFILEATTRIBUTES)
    EndIf

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

    ;~ ' sFileSpec can be any file. You can specify a
    ;~ ' file that does not exist and still get the
    ;~ ' icon, for example sFileSpec = "C:\PANTS.DOC"
    Local $lR = _WinAPI_SHGetFileInfo( _
    $sFileSpec, $FILE_ATTRIBUTE_NORMAL, DllStructGetPtr($FileInfo), DllStructGetSize($FileInfo), _
    $dwFlags _
    )

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

    If ($lR = 0) Then
    Return SetError(1, 0, -1)
    Else
    Return DllStructGetData($FileInfo, "iIcon")
    EndIf
    EndFunc ;==>_GUIImageList_GetFileIconIndex

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

    ; Author(s): Prog@ndy
    Func __SHLV_FileDateString2Calc($filedate)
    Return StringRegExpReplace($filedate, "(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})", "$1/$2/$3 $4:$5:$6")
    EndFunc ;==>_FileDateString2Calc
    ; Author(s): Prog@ndy
    Func __SHLV_CalcDate2FileDateString($calcdate)
    Return StringRegExpReplace($calcdate, "(\d{4})/(\d{2})/(\d{2}) (\d{2})(IMG:http://www.autoitscript.com/forum/style_em…/autoit/sad.gif) \d{2})(IMG:http://www.autoitscript.com/forum/style_em…/autoit/sad.gif) \d{2})", "$1$2$3$4$5$6")
    EndFunc ;==>_CalcDate2FileDateString

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

    ; Prog@ndy
    Func _SHLV_WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
    #forceref $hWnd, $iMsg, $iwParam
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $tInfo, $hListView1 = $SHELLLISTVIEWHANDLE

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

    $tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")
    Switch $hWndFrom
    Case $hListView1
    Switch $iCode
    Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button
    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    ;~ _DebugPrint("$NM_DBLCLK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    ;~ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _
    ;~ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
    ConsoleWrite("lll" & @CRLF)
    If _GUICtrlListView_GetItemImage($hListView1, DllStructGetData($tInfo, "Index")) = $FOLDER_ICON_INDEX Then
    $DIRECTORY_LOCAL &= _GUICtrlListView_GetItemText($hListView1, DllStructGetData($tInfo, "Index"))
    _SHLV_PopulateLocalListView($ListView1,$DIRECTORY_LOCAL)
    ElseIf StringRegExp(_GUICtrlListView_GetItemText($hListView1, DllStructGetData($tInfo, "Index"), 0), "\A[A-Za-z]:\\\Z") Then
    $DIRECTORY_LOCAL = _GUICtrlListView_GetItemText($hListView1, DllStructGetData($tInfo, "Index"))
    _SHLV_PopulateLocalListView($ListView1,$DIRECTORY_LOCAL)
    ElseIf _GUICtrlListView_GetItemText($hListView1, DllStructGetData($tInfo, "Index")) = "[..]" Then
    Local $slash = StringInStr($DIRECTORY_LOCAL, "\", 1, -2)
    If $slash Then
    $DIRECTORY_LOCAL = StringLeft($DIRECTORY_LOCAL, $slash)
    ElseIf StringRegExp($DIRECTORY_LOCAL, "\A[A-Za-z]:\\\Z") Then
    $DIRECTORY_LOCAL = ""
    EndIf
    _SHLV_PopulateLocalListView($ListView1,$DIRECTORY_LOCAL)
    EndIf
    ; No return value
    EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_NOTIFY

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

    ; Author ........: SolidSnake <MetalGX91 at GMail dot com>
    ; Modified by Prog@ndy
    Func _SHLV__FileListToArray2($sPath, $sFilter = "*", $iFlag = 0)
    Local $hSearch, $sFile, $asFileList
    If Not FileExists($sPath) Then Return SetError(1, 1, "")
    If (StringInStr($sFilter, "\")) Or (StringInStr($sFilter, "/")) Or (StringInStr($sFilter, ":")) Or (StringInStr($sFilter, ">")) Or (StringInStr($sFilter, "<")) Or (StringInStr($sFilter, "|")) Or (StringStripWS($sFilter, 8) = "") Then Return SetError(2, 2, "")
    If Not ($iFlag = 0 Or $iFlag = 1 Or $iFlag = 2) Then Return SetError(3, 3, "")
    If (StringMid($sPath, StringLen($sPath), 1) = "\") Then $sPath = StringTrimRight($sPath, 1) ; needed for Win98 for x:\ root dir
    $hSearch = FileFindFirstFile($sPath & "\" & $sFilter)
    If $hSearch = -1 Then Return SetError(4, 4, "")
    While 1
    $sFile = FileFindNextFile($hSearch)
    If @error Then
    SetError(0)
    ExitLoop
    EndIf
    If $iFlag = 1 And StringInStr(FileGetAttrib($sPath & "\" & $sFile), "D") <> 0 Then ContinueLoop
    If $iFlag = 2 And StringInStr(FileGetAttrib($sPath & "\" & $sFile), "D") = 0 Then ContinueLoop
    $asFileList &= $sFile & @CR
    ;~ ReDim $asFileList[UBound($asFileList) + 1]
    ;~ $asFileList[0] = $asFileList[0] + 1
    ;~ $asFileList[UBound($asFileList) - 1] = $sFile
    WEnd
    FileClose($hSearch)
    Return StringSplit(StringTrimRight($asFileList,1),@CR)
    EndFunc ;==>_SHLV__FileListToArray2

    [/autoit]


    Danke im Vorraus :rolleyes:

  • Das Script soll ein Fenster zeigen, indem alle Ordner und Dateien angezeigt werden.
    So ähnlich wie im Windows Explorer nur eben in einer ListView!!
    Man soll auch auf einen Ordner klicken können und dann in den Unterordner kommen.

    L.G. FireTiger :D

  • Da ist bei ein paar Funktionen der ListVIew-UDF was geändert worden. Ersetze mal

    [autoit]

    Func _SHLV_PopulateLocalListView($hListView1,ByRef $DIRECTORY_LOCAL)
    If $DIRECTORY_LOCAL = "" Then

    [/autoit]


    mit

    [autoit]

    Func _SHLV_PopulateLocalListView($hListView1,ByRef $DIRECTORY_LOCAL)
    If Not IsHWnd($hListView1) Then $hListView1 = GUICtrlGetHandle($hListView1)
    If $DIRECTORY_LOCAL = "" Then

    [/autoit]
  • Hey,
    bei mir funktieoniert es hast du Laufwerk n:\ ??

    lg SubZero ;)
    ==========================================================================

    "Der Computer ist die logische Weiterentwicklung des Menschen: Intelligenz ohne Moral."

  • In deinem Skript steht N:\ ;) und was funktioniert hier nicht?

    Spoiler anzeigen
    [autoit]

    ;#BETA
    #include <GuiImageList.au3>
    #include <GUIListView.au3>

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

    #include <GUIConstantsEx.au3>
    #include <ListViewConstants.au3>
    #include <EditConstants.au3>
    #include <WindowsConstants.au3>

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

    Global Const $tagSHFILEINFO = "dword hIcon; int iIcon; DWORD dwAttributes; CHAR szDisplayName[255]; CHAR szTypeName[80];"
    Global Const $SHGFI_USEFILEATTRIBUTES = 0x10
    Global Const $SHGFI_SYSICONINDEX = 0x4000
    Global Const $FILE_ATTRIBUTE_NORMAL = 0x80
    Global Const $SHGFI_SMALLICON = 0x1
    Global Const $SHGFI_LARGEICON = 0x0

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

    Global Const $FOLDER_ICON_INDEX = _GUIImageList_GetFileIconIndex(@SystemDir, 0, 1)
    Global Const $NOICON_ICON_INDEX = _GUIImageList_GetFileIconIndex("nb lgl", 0, 0)

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

    Opt("GUIOnEventMode", 1)
    #Region ### START Koda GUI section ### Form=D:\Dokumente\Dateien von Andreas\AutoIt3\FTP\GUI_MAIN.kxf
    Global $GUI_MAIN = GUICreate("Au3FTP", 882, 586, 193, 125)
    GUISetOnEvent(-3,"GUI_Close")

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

    Global $inpLocalDirectory = GUICtrlCreateInput("", 8, 28, 369, 20, $ES_READONLY)
    Global $ListView1 = GUICtrlCreateListView("Name|Datum|Größe", 8, 48, 369, 489)

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

    Global $SHELLLISTVIEWHANDLE = GUICtrlGetHandle($ListView1) ; Get the Handle

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

    GUICtrlSendMsg($ListView1, 0x101E, 0, 200)
    GUICtrlSendMsg($ListView1, 0x101E, 1, 75)
    GUICtrlSendMsg($ListView1, 0x101E, 2, 50)
    GUIRegisterMsg($WM_NOTIFY, "_SHLV_WM_NOTIFY")

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

    _GUICtrlListView_SetImageList($ListView1, _GUIImageList_GetSystemImageList(), 1)
    Global $DIRECTORY_LOCAL = "" ; Start with Selection of drives (IMG:http://www.autoitscript.com/forum/style_em…utoit/smile.gif)
    _SHLV_PopulateLocalListView($SHELLLISTVIEWHANDLE,$DIRECTORY_LOCAL)

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

    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    Sleep(100)
    WEnd

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

    Func GUI_Close()
    Exit
    EndFunc

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

    ; Prog@ndy
    Func _SHLV_PopulateLocalListView($hListView1,ByRef $DIRECTORY_LOCAL)
    If Not IsHWnd($hListView1) Then $hListView1 = GUICtrlGetHandle($hListView1)
    If $DIRECTORY_LOCAL = "" Then
    Local $drives = DriveGetDrive("ALL")
    GUICtrlSetData($inpLocalDirectory, "Drive Selection")
    _GUICtrlListView_BeginUpdate($hListView1)
    _GUICtrlListView_DeleteAllItems($hListView1)
    For $i = 1 To $drives[0]
    _GUICtrlListView_AddItem($hListView1, StringUpper($drives[$i]) & "\", _GUIImageList_GetFileIconIndex($drives[$i] & "\"))
    Next
    _GUICtrlListView_EndUpdate($hListView1)
    Return
    EndIf
    If StringRight($DIRECTORY_LOCAL, 1) <> "\" Then $DIRECTORY_LOCAL &= "\"
    If DriveStatus(StringLeft($DIRECTORY_LOCAL, 3)) <> "READY" Then Return 0 * MsgBox(16 + 8192, 'Error on Drive Access', "Drive " & StringLeft($DIRECTORY_LOCAL, 3) & " not ready!")
    GUICtrlSetData($inpLocalDirectory, $DIRECTORY_LOCAL)
    $files = _SHLV__FileListToArray2($DIRECTORY_LOCAL, "*.*", 2)
    _GUICtrlListView_BeginUpdate($hListView1)
    _GUICtrlListView_DeleteAllItems($hListView1)
    Local $foldercount = 0
    _GUICtrlListView_AddItem($hListView1, "[..]", 1)
    If IsArray($files) Then
    _GUICtrlListView_SetItemCount($hListView1,$files[0]+1)
    $foldercount = $files[0]+1
    For $i = 1 To $files[0]
    $item = _GUICtrlListView_AddItem($hListView1, $files[$i], $FOLDER_ICON_INDEX)
    _GUICtrlListView_AddSubItem($hListView1, $item, __SHLV_FormatFilesize(DirGetSize($DIRECTORY_LOCAL & $files[$i], 2)), 2)
    Next
    EndIf
    $files = _SHLV__FileListToArray2($DIRECTORY_LOCAL, "*.*", 1)
    _GUICtrlListView_EndUpdate($hListView1)
    _GUICtrlListView_BeginUpdate($hListView1)
    If IsArray($files) Then
    _GUICtrlListView_SetItemCount($hListView1,$files[0]+$foldercount)
    For $i = 1 To $files[0]
    $item = _GUICtrlListView_AddItem($hListView1, $files[$i], _GUIImageList_GetFileIconIndex($files[$i]))
    _GUICtrlListView_AddSubItem($hListView1, $item, __SHLV_FileDateString2Calc(FileGetTime($DIRECTORY_LOCAL & $files[$i], 0, 1)), 1)
    _GUICtrlListView_AddSubItem($hListView1, $item, __SHLV_FormatFilesize(FileGetSize($DIRECTORY_LOCAL & $files[$i])), 2)
    Next
    EndIf
    _GUICtrlListView_EndUpdate($hListView1)
    EndFunc ;==>_SHLV_PopulateLocalListView

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

    ; Prog@ndy
    Func __SHLV_FormatFilesize($size)
    Select
    Case $size > 1000
    Return Round($size / 1024, 1) & " KB"
    Case $size > 1048500
    Return Round($size / 1048576, 1) & " MB"
    Case Else
    Return $size & " Byte"
    EndSelect
    EndFunc ;==>_FormatFilesize

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

    ; Prog@ndy
    Func _GUIImageList_GetSystemImageList($bLargeIcons = False)
    Local $dwFlags, $hIml, $FileInfo = DllStructCreate($tagSHFILEINFO)

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

    $dwFlags = BitOR($SHGFI_USEFILEATTRIBUTES, $SHGFI_SYSICONINDEX)
    If Not ($bLargeIcons) Then
    $dwFlags = BitOR($dwFlags, $SHGFI_SMALLICON)
    EndIf

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

    ;~ '// Load the image list - use an arbitrary file extension for the
    ;~ '// call to SHGetFileInfo (we don't want to touch the disk, so use
    ;~ '// FILE_ATTRIBUTE_NORMAL && SHGFI_USEFILEATTRIBUTES).
    $hIml = _WinAPI_SHGetFileInfo(".txt", $FILE_ATTRIBUTE_NORMAL, _
    DllStructGetPtr($FileInfo), DllStructGetSize($FileInfo), $dwFlags)

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

    Return $hIml
    EndFunc ;==>_GUIImageList_GetSystemImageList

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

    ; Prog@ndy
    Func _WinAPI_SHGetFileInfo($pszPath, $dwFileAttributes, $psfi, $cbFileInfo, $uFlags)
    Local $return = DllCall("shell32.dll", "DWORD*", "SHGetFileInfo", "str", $pszPath, "DWORD", $dwFileAttributes, "ptr", $psfi, "UINT", $cbFileInfo, "UINT", $uFlags)
    If @error Then Return SetError(@error, 0, 0)
    Return $return[0]
    EndFunc ;==>_WinAPI_SHGetFileInfo

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

    ; Prog@ndy
    Func _GUIImageList_GetFileIconIndex($sFileSpec, $bLargeIcons = False, $bForceLoadFromDisk = False)
    Local $dwFlags, $FileInfo = DllStructCreate($tagSHFILEINFO)

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

    $dwFlags = $SHGFI_SYSICONINDEX
    If $bLargeIcons Then
    $dwFlags = BitOR($dwFlags, $SHGFI_LARGEICON)
    Else
    $dwFlags = BitOR($dwFlags, $SHGFI_SMALLICON)
    EndIf
    ;~ ' We choose whether to access the disk or not. If you don't
    ;~ ' hit the disk, you may get the wrong icon if the icon is
    ;~ ' not cached. But the speed is very good!
    If Not $bForceLoadFromDisk Then
    $dwFlags = BitOR($dwFlags, $SHGFI_USEFILEATTRIBUTES)
    EndIf

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

    ;~ ' sFileSpec can be any file. You can specify a
    ;~ ' file that does not exist and still get the
    ;~ ' icon, for example sFileSpec = "C:\PANTS.DOC"
    Local $lR = _WinAPI_SHGetFileInfo( _
    $sFileSpec, $FILE_ATTRIBUTE_NORMAL, DllStructGetPtr($FileInfo), DllStructGetSize($FileInfo), _
    $dwFlags _
    )

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

    If ($lR = 0) Then
    Return SetError(1, 0, -1)
    Else
    Return DllStructGetData($FileInfo, "iIcon")
    EndIf
    EndFunc ;==>_GUIImageList_GetFileIconIndex

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

    ; Author(s): Prog@ndy
    Func __SHLV_FileDateString2Calc($filedate)
    Return StringRegExpReplace($filedate, "(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})", "$1/$2/$3 $4:$5:$6")
    EndFunc ;==>_FileDateString2Calc
    ; Author(s): Prog@ndy
    Func __SHLV_CalcDate2FileDateString($calcdate)
    Return StringRegExpReplace($calcdate, "(\d{4})/(\d{2})/(\d{2}) (\d{2})(IMG:http://www.autoitscript.com/forum/style_em…/autoit/sad.gif) \d{2})(IMG:http://www.autoitscript.com/forum/style_em…/autoit/sad.gif) \d{2})", "$1$2$3$4$5$6")
    EndFunc ;==>_CalcDate2FileDateString

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

    ; Prog@ndy
    Func _SHLV_WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
    #forceref $hWnd, $iMsg, $iwParam
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $tInfo, $hListView1 = $SHELLLISTVIEWHANDLE

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

    $tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")
    Switch $hWndFrom
    Case $hListView1
    Switch $iCode
    Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button
    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    ;~ _DebugPrint("$NM_DBLCLK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    ;~ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _
    ;~ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
    ConsoleWrite("lll" & @CRLF)
    If _GUICtrlListView_GetItemImage($hListView1, DllStructGetData($tInfo, "Index")) = $FOLDER_ICON_INDEX Then
    $DIRECTORY_LOCAL &= _GUICtrlListView_GetItemText($hListView1, DllStructGetData($tInfo, "Index"))
    _SHLV_PopulateLocalListView($ListView1,$DIRECTORY_LOCAL)
    ElseIf StringRegExp(_GUICtrlListView_GetItemText($hListView1, DllStructGetData($tInfo, "Index"), 0), "\A[A-Za-z]:\\\Z") Then
    $DIRECTORY_LOCAL = _GUICtrlListView_GetItemText($hListView1, DllStructGetData($tInfo, "Index"))
    _SHLV_PopulateLocalListView($ListView1,$DIRECTORY_LOCAL)
    ElseIf _GUICtrlListView_GetItemText($hListView1, DllStructGetData($tInfo, "Index")) = "[..]" Then
    Local $slash = StringInStr($DIRECTORY_LOCAL, "\", 1, -2)
    If $slash Then
    $DIRECTORY_LOCAL = StringLeft($DIRECTORY_LOCAL, $slash)
    ElseIf StringRegExp($DIRECTORY_LOCAL, "\A[A-Za-z]:\\\Z") Then
    $DIRECTORY_LOCAL = ""
    EndIf
    _SHLV_PopulateLocalListView($ListView1,$DIRECTORY_LOCAL)
    EndIf
    ; No return value
    EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_NOTIFY

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

    ; Author ........: SolidSnake <MetalGX91 at GMail dot com>
    ; Modified by Prog@ndy
    Func _SHLV__FileListToArray2($sPath, $sFilter = "*", $iFlag = 0)
    Local $hSearch, $sFile, $asFileList
    If Not FileExists($sPath) Then Return SetError(1, 1, "")
    If (StringInStr($sFilter, "\")) Or (StringInStr($sFilter, "/")) Or (StringInStr($sFilter, ":")) Or (StringInStr($sFilter, ">")) Or (StringInStr($sFilter, "<")) Or (StringInStr($sFilter, "|")) Or (StringStripWS($sFilter, 8) = "") Then Return SetError(2, 2, "")
    If Not ($iFlag = 0 Or $iFlag = 1 Or $iFlag = 2) Then Return SetError(3, 3, "")
    If (StringMid($sPath, StringLen($sPath), 1) = "\") Then $sPath = StringTrimRight($sPath, 1) ; needed for Win98 for x:\ root dir
    $hSearch = FileFindFirstFile($sPath & "\" & $sFilter)
    If $hSearch = -1 Then Return SetError(4, 4, "")
    While 1
    $sFile = FileFindNextFile($hSearch)
    If @error Then
    SetError(0)
    ExitLoop
    EndIf
    If $iFlag = 1 And StringInStr(FileGetAttrib($sPath & "\" & $sFile), "D") <> 0 Then ContinueLoop
    If $iFlag = 2 And StringInStr(FileGetAttrib($sPath & "\" & $sFile), "D") = 0 Then ContinueLoop
    $asFileList &= $sFile & @CR
    WEnd
    FileClose($hSearch)
    If Not $asFileList Then
    Dim $asFileList[1]=[0]
    Return SetError(1,0,$asFileList)
    EndIf
    Return StringSplit(StringTrimRight($asFileList,1),@CR)
    EndFunc ;==>_SHLV__FileListToArray2

    [/autoit]
  • du hast nicht das Skript aus dem vorherigen Post verwendet. Da kommt das nicht.
    //Edit: und hast du vielleicht 64 bit?

  • Warum nicht einfach das?

    [autoit]

    _IECreateEmbedded

    [/autoit]

    MfG. tobi_girst

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »tobi_girst« (Morgen, 25:63)

  • Ich verwende __IECreateEmbedded selbs für meinen "DobleFileBrowser", praktisch, wenn man Daten verschieben muss.

    MfG. tobi_girst

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »tobi_girst« (Morgen, 25:63)

  • OK, ich hab die Erkennugsroutine für Verzeichnisse angepasst. Bisher hab ich das über das Icon gemacht, jezt teste ich richtig auf das "D"-Attribut ;)

    Spoiler anzeigen
    [autoit]

    ;#BETA
    #include <GuiImageList.au3>
    #include <GUIListView.au3>

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

    #include <GUIConstantsEx.au3>
    #include <ListViewConstants.au3>
    #include <EditConstants.au3>
    #include <WindowsConstants.au3>

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

    Global Const $tagSHFILEINFO = "dword hIcon; int iIcon; DWORD dwAttributes; CHAR szDisplayName[255]; CHAR szTypeName[80];"
    Global Const $SHGFI_USEFILEATTRIBUTES = 0x10
    Global Const $SHGFI_SYSICONINDEX = 0x4000
    Global Const $FILE_ATTRIBUTE_NORMAL = 0x80
    Global Const $SHGFI_SMALLICON = 0x1
    Global Const $SHGFI_LARGEICON = 0x0

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

    Global Const $FOLDERUP_ICON_INDEX = _GUIImageList_AddIcon(_GUIImageList_GetSystemImageList(), @SystemDir&"\shell32.dll", 132)
    Global Const $FOLDER_ICON_INDEX = _GUIImageList_GetFileIconIndex(@SystemDir, 0, 1)
    Global Const $NOICON_ICON_INDEX = _GUIImageList_GetFileIconIndex("nb lgl", 0, 0)

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

    Opt("GUIOnEventMode", 1)
    #Region ### START Koda GUI section ### Form=D:\Dokumente\Dateien von Andreas\AutoIt3\FTP\GUI_MAIN.kxf
    Global $GUI_MAIN = GUICreate("Au3FTP", 882, 586, 193, 125)
    GUISetOnEvent(-3,"GUI_Close")

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

    Global $inpLocalDirectory = GUICtrlCreateInput("", 8, 28, 369, 20, $ES_READONLY)
    Global $ListView1 = GUICtrlCreateListView("Name|Datum|Größe", 8, 48, 369, 489)

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

    Global $SHELLLISTVIEWHANDLE = GUICtrlGetHandle($ListView1) ; Get the Handle

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

    GUICtrlSendMsg($ListView1, 0x101E, 0, 200)
    GUICtrlSendMsg($ListView1, 0x101E, 1, 75)
    GUICtrlSendMsg($ListView1, 0x101E, 2, 50)
    GUIRegisterMsg($WM_NOTIFY, "_SHLV_WM_NOTIFY")

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

    _GUICtrlListView_SetImageList($ListView1, _GUIImageList_GetSystemImageList(), 1)
    Global $DIRECTORY_LOCAL = "" ; Start with Selection of drives (IMG:http://www.autoitscript.com/forum/style_em…utoit/smile.gif)
    _SHLV_PopulateLocalListView($SHELLLISTVIEWHANDLE,$DIRECTORY_LOCAL)

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

    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    Sleep(100)
    WEnd

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

    Func GUI_Close()
    Exit
    EndFunc

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

    ; Prog@ndy
    Func _SHLV_PopulateLocalListView($hListView1,ByRef $DIRECTORY_LOCAL)
    If Not IsHWnd($hListView1) Then $hListView1 = GUICtrlGetHandle($hListView1)
    If $DIRECTORY_LOCAL = "" Then
    Local $drives = DriveGetDrive("ALL")
    GUICtrlSetData($inpLocalDirectory, "Drive Selection")
    _GUICtrlListView_BeginUpdate($hListView1)
    _GUICtrlListView_DeleteAllItems($hListView1)
    For $i = 1 To $drives[0]
    _GUICtrlListView_AddItem($hListView1, StringUpper($drives[$i]) & "\", _GUIImageList_GetFileIconIndex($drives[$i] & "\"))
    Next
    _GUICtrlListView_EndUpdate($hListView1)
    Return
    EndIf
    If StringRight($DIRECTORY_LOCAL, 1) <> "\" Then $DIRECTORY_LOCAL &= "\"
    If DriveStatus(StringLeft($DIRECTORY_LOCAL, 3)) <> "READY" Then Return 0 * MsgBox(16 + 8192, 'Error on Drive Access', "Drive " & StringLeft($DIRECTORY_LOCAL, 3) & " not ready!")
    GUICtrlSetData($inpLocalDirectory, $DIRECTORY_LOCAL)
    $files = _SHLV__FileListToArray2($DIRECTORY_LOCAL, "*.*", 2)
    _GUICtrlListView_BeginUpdate($hListView1)
    _GUICtrlListView_DeleteAllItems($hListView1)
    Local $foldercount = 0
    _GUICtrlListView_AddItem($hListView1, "< .. >", $FOLDERUP_ICON_INDEX)
    If IsArray($files) Then
    _GUICtrlListView_SetItemCount($hListView1,$files[0]+1)
    $foldercount = $files[0]+1
    For $i = 1 To $files[0]
    $item = _GUICtrlListView_AddItem($hListView1, $files[$i], $FOLDER_ICON_INDEX)
    _GUICtrlListView_AddSubItem($hListView1, $item, __SHLV_FormatFilesize(DirGetSize($DIRECTORY_LOCAL & $files[$i], 2)), 2)
    Next
    EndIf
    $files = _SHLV__FileListToArray2($DIRECTORY_LOCAL, "*.*", 1)
    _GUICtrlListView_EndUpdate($hListView1)
    _GUICtrlListView_BeginUpdate($hListView1)
    If IsArray($files) Then
    _GUICtrlListView_SetItemCount($hListView1,$files[0]+$foldercount)
    For $i = 1 To $files[0]
    $item = _GUICtrlListView_AddItem($hListView1, $files[$i], _GUIImageList_GetFileIconIndex($files[$i]))
    _GUICtrlListView_AddSubItem($hListView1, $item, __SHLV_FileDateString2Calc(FileGetTime($DIRECTORY_LOCAL & $files[$i], 0, 1)), 1)
    _GUICtrlListView_AddSubItem($hListView1, $item, __SHLV_FormatFilesize(FileGetSize($DIRECTORY_LOCAL & $files[$i])), 2)
    Next
    EndIf
    _GUICtrlListView_EndUpdate($hListView1)
    EndFunc ;==>_SHLV_PopulateLocalListView

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

    ; Prog@ndy
    Func __SHLV_FormatFilesize($size)
    Select
    Case $size > 1000
    Return Round($size / 1024, 1) & " KB"
    Case $size > 1048500
    Return Round($size / 1048576, 1) & " MB"
    Case Else
    Return $size & " Byte"
    EndSelect
    EndFunc ;==>_FormatFilesize

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

    ; Prog@ndy
    Func _GUIImageList_GetSystemImageList($bLargeIcons = False)
    Local $dwFlags, $hIml, $FileInfo = DllStructCreate($tagSHFILEINFO)

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

    $dwFlags = BitOR($SHGFI_USEFILEATTRIBUTES, $SHGFI_SYSICONINDEX)
    If Not ($bLargeIcons) Then
    $dwFlags = BitOR($dwFlags, $SHGFI_SMALLICON)
    EndIf

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

    ;~ '// Load the image list - use an arbitrary file extension for the
    ;~ '// call to SHGetFileInfo (we don't want to touch the disk, so use
    ;~ '// FILE_ATTRIBUTE_NORMAL && SHGFI_USEFILEATTRIBUTES).
    $hIml = _WinAPI_SHGetFileInfo(".txt", $FILE_ATTRIBUTE_NORMAL, _
    DllStructGetPtr($FileInfo), DllStructGetSize($FileInfo), $dwFlags)

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

    Return $hIml
    EndFunc ;==>_GUIImageList_GetSystemImageList

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

    ; Prog@ndy
    Func _WinAPI_SHGetFileInfo($pszPath, $dwFileAttributes, $psfi, $cbFileInfo, $uFlags)
    Local $return = DllCall("shell32.dll", "DWORD*", "SHGetFileInfo", "str", $pszPath, "DWORD", $dwFileAttributes, "ptr", $psfi, "UINT", $cbFileInfo, "UINT", $uFlags)
    If @error Then Return SetError(@error, 0, 0)
    Return $return[0]
    EndFunc ;==>_WinAPI_SHGetFileInfo

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

    ; Prog@ndy
    Func _GUIImageList_GetFileIconIndex($sFileSpec, $bLargeIcons = False, $bForceLoadFromDisk = False)
    Local $dwFlags, $FileInfo = DllStructCreate($tagSHFILEINFO)

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

    $dwFlags = $SHGFI_SYSICONINDEX
    If $bLargeIcons Then
    $dwFlags = BitOR($dwFlags, $SHGFI_LARGEICON)
    Else
    $dwFlags = BitOR($dwFlags, $SHGFI_SMALLICON)
    EndIf
    ;~ ' We choose whether to access the disk or not. If you don't
    ;~ ' hit the disk, you may get the wrong icon if the icon is
    ;~ ' not cached. But the speed is very good!
    If Not $bForceLoadFromDisk Then
    $dwFlags = BitOR($dwFlags, $SHGFI_USEFILEATTRIBUTES)
    EndIf

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

    ;~ ' sFileSpec can be any file. You can specify a
    ;~ ' file that does not exist and still get the
    ;~ ' icon, for example sFileSpec = "C:\PANTS.DOC"
    Local $lR = _WinAPI_SHGetFileInfo( _
    $sFileSpec, $FILE_ATTRIBUTE_NORMAL, DllStructGetPtr($FileInfo), DllStructGetSize($FileInfo), _
    $dwFlags _
    )

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

    If ($lR = 0) Then
    Return SetError(1, 0, -1)
    Else
    Return DllStructGetData($FileInfo, "iIcon")
    EndIf
    EndFunc ;==>_GUIImageList_GetFileIconIndex

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

    ; Author(s): Prog@ndy
    Func __SHLV_FileDateString2Calc($filedate)
    Return StringRegExpReplace($filedate, "(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})", "$1/$2/$3 $4:$5:$6")
    EndFunc ;==>_FileDateString2Calc
    ; Author(s): Prog@ndy
    Func __SHLV_CalcDate2FileDateString($calcdate)
    Return StringRegExpReplace($calcdate, "(\d{4})/(\d{2})/(\d{2}) (\d{2})(IMG:http://www.autoitscript.com/forum/style_em…/autoit/sad.gif) \d{2})(IMG:http://www.autoitscript.com/forum/style_em…/autoit/sad.gif) \d{2})", "$1$2$3$4$5$6")
    EndFunc ;==>_CalcDate2FileDateString

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

    ; Prog@ndy
    Func _SHLV_WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
    #forceref $hWnd, $iMsg, $iwParam
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $tInfo, $hListView1 = $SHELLLISTVIEWHANDLE

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

    $tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")
    Switch $hWndFrom
    Case $hListView1
    Switch $iCode
    Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button
    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    ;~ _DebugPrint("$NM_DBLCLK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    ;~ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _
    ;~ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
    Local $ItemText = _GUICtrlListView_GetItemText($hListView1, DllStructGetData($tInfo, "Index"), 0)
    If StringInStr(FileGetAttrib($DIRECTORY_LOCAL&$ItemText),"D") Then
    $DIRECTORY_LOCAL &= $ItemText
    _SHLV_PopulateLocalListView($ListView1,$DIRECTORY_LOCAL)
    ElseIf StringRegExp($ItemText, "\A[A-Za-z]:\\\Z") Then
    $DIRECTORY_LOCAL = $ItemText
    _SHLV_PopulateLocalListView($ListView1,$DIRECTORY_LOCAL)
    ElseIf $ItemText = "< .. >" Then
    Local $slash = StringInStr($DIRECTORY_LOCAL, "\", 1, -2)
    If $slash Then
    $DIRECTORY_LOCAL = StringLeft($DIRECTORY_LOCAL, $slash)
    ElseIf StringRegExp($DIRECTORY_LOCAL, "\A[A-Za-z]:\\\Z") Then
    $DIRECTORY_LOCAL = ""
    EndIf
    _SHLV_PopulateLocalListView($ListView1,$DIRECTORY_LOCAL)
    Else
    If MsgBox(36, "ShellListView", "Soll diese Datei geöffnet werden? " & @CRLF & $DIRECTORY_LOCAL&$ItemText) = 6 Then
    ShellExecute($DIRECTORY_LOCAL&$ItemText,"", $DIRECTORY_LOCAL)
    EndIf
    EndIf
    ; No return value
    EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_NOTIFY

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

    ; Author ........: SolidSnake <MetalGX91 at GMail dot com>
    ; Modified by Prog@ndy
    Func _SHLV__FileListToArray2($sPath, $sFilter = "*", $iFlag = 0)
    Local $hSearch, $sFile, $asFileList
    If Not FileExists($sPath) Then Return SetError(1, 1, "")
    If (StringInStr($sFilter, "\")) Or (StringInStr($sFilter, "/")) Or (StringInStr($sFilter, ":")) Or (StringInStr($sFilter, ">")) Or (StringInStr($sFilter, "<")) Or (StringInStr($sFilter, "|")) Or (StringStripWS($sFilter, 8) = "") Then Return SetError(2, 2, "")
    If Not ($iFlag = 0 Or $iFlag = 1 Or $iFlag = 2) Then Return SetError(3, 3, "")
    If (StringMid($sPath, StringLen($sPath), 1) = "\") Then $sPath = StringTrimRight($sPath, 1) ; needed for Win98 for x:\ root dir
    $hSearch = FileFindFirstFile($sPath & "\" & $sFilter)
    If $hSearch = -1 Then Return SetError(4, 4, "")
    While 1
    $sFile = FileFindNextFile($hSearch)
    If @error Then
    SetError(0)
    ExitLoop
    EndIf
    If $iFlag = 1 And StringInStr(FileGetAttrib($sPath & "\" & $sFile), "D") <> 0 Then ContinueLoop
    If $iFlag = 2 And StringInStr(FileGetAttrib($sPath & "\" & $sFile), "D") = 0 Then ContinueLoop
    $asFileList &= $sFile & @CR
    WEnd
    FileClose($hSearch)
    If Not $asFileList Then
    Dim $asFileList[1]=[0]
    Return SetError(1,0,$asFileList)
    EndIf
    Return StringSplit(StringTrimRight($asFileList,1),@CR)
    EndFunc ;==>_SHLV__FileListToArray2

    [/autoit]
  • Hi Danke, progandy,
    Man kann ja im ListView mit den Pfeiltasten navigieren, man kann aber dann nicht mit der Enter Taste einen Ordnerauswählen um in den Unterordner zu kommen!
    Ich hab mit überlegt, wenn es $NM_DBLCLK gibt muss es auch $NM_RETURN geben aber dass will nicht funktionieren!
    :huh:

  • Ja ich weiß, darum hab ich ja gefragt!
    Aber vielleicht hat ja noch ein anderer eine Idee. Es muss auf jeden Fall irgendwie funktionieren
    :huh: :S

  • Hab was gefunden ;)
    http://www.tech-archive.net/Archive/Develo…8/msg00062.html
    http://www.autoitscript.com/forum/index.php?s=&showtopic=83621&view=findpost&p=599478

    Spoiler anzeigen
    [autoit]

    ;#BETA
    #include <GuiImageList.au3>
    #include <GUIListView.au3>

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

    #include <GUIConstantsEx.au3>
    #include <ListViewConstants.au3>
    #include <EditConstants.au3>
    #include <WindowsConstants.au3>
    #include <Constants.au3>

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

    Global Const $tagSHFILEINFO = "dword hIcon; int iIcon; DWORD dwAttributes; CHAR szDisplayName[255]; CHAR szTypeName[80];"
    Global Const $SHGFI_USEFILEATTRIBUTES = 0x10
    Global Const $SHGFI_SYSICONINDEX = 0x4000
    ;~ Global Const $FILE_ATTRIBUTE_NORMAL = 0x80
    Global Const $SHGFI_SMALLICON = 0x1
    Global Const $SHGFI_LARGEICON = 0x0

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

    Global Const $FOLDERUP_ICON_INDEX = _GUIImageList_AddIcon(_GUIImageList_GetSystemImageList(), @SystemDir&"\shell32.dll", 132)
    Global Const $FOLDER_ICON_INDEX = _GUIImageList_GetFileIconIndex(@SystemDir, 0, 1)
    Global Const $NOICON_ICON_INDEX = _GUIImageList_GetFileIconIndex("nb lgl", 0, 0)

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

    Opt("GUIOnEventMode", 1)
    #Region ### START Koda GUI section ### Form=D:\Dokumente\Dateien von Andreas\AutoIt3\FTP\GUI_MAIN.kxf
    Global $GUI_MAIN = GUICreate("Au3FTP", 882, 586, 193, 125)
    GUISetOnEvent(-3,"GUI_Close")

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

    Global $inpLocalDirectory = GUICtrlCreateInput("", 8, 28, 369, 20, $ES_READONLY)
    Global $ListView1 = GUICtrlCreateListView("Name|Datum|Größe", 8, 48, 369, 489)
    Global $hListView1 = GUICtrlGetHandle($ListView1)
    Global $SHELLLISTVIEWHANDLE = GUICtrlGetHandle($ListView1) ; Get the Handle

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

    GUICtrlSendMsg($ListView1, 0x101E, 0, 200)
    GUICtrlSendMsg($ListView1, 0x101E, 1, 75)
    GUICtrlSendMsg($ListView1, 0x101E, 2, 50)
    GUIRegisterMsg($WM_NOTIFY, "_SHLV_WM_NOTIFY")

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

    _GUICtrlListView_SetImageList($ListView1, _GUIImageList_GetSystemImageList(), 1)
    Global $DIRECTORY_LOCAL = "" ; Start with Selection of drives (IMG:http://www.autoitscript.com/forum/style_em…utoit/smile.gif)
    _SHLV_PopulateLocalListView($SHELLLISTVIEWHANDLE,$DIRECTORY_LOCAL)
    Global Const $_ListView_AllowEnter_WindowProcHandle = DllCallbackRegister("_ListView_AllowEnter_WindowProc", "lresult", "hwnd;uint;wparam;lparam")
    Global Const $_HLISTVIEW_wProcOld = _WinAPI_SetWindowLong($hListView1, $GWL_WNDPROC, DllCallbackGetPtr($_ListView_AllowEnter_WindowProcHandle))

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

    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    Sleep(100)
    WEnd

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

    Func _ListView_AllowEnter_WindowProc($hWnd, $Msg, $wParam, $lParam)
    If $hWnd=$hListView1 And $Msg=$WM_GETDLGCODE And $wParam=0x0D Then Return 0x4 ;$DLGC_WANTALLKEYS
    Return _WinAPI_CallWindowProc($_HLISTVIEW_wProcOld, $hWnd, $Msg, $wParam, $lParam)
    EndFunc

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

    Func GUI_Close()
    _WinAPI_SetWindowLong($hListView1, $GWL_WNDPROC, $_HLISTVIEW_wProcOld)
    Exit
    EndFunc
    Func OnAutoItExit()
    DllCallbackFree($_ListView_AllowEnter_WindowProcHandle)
    EndFunc

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

    ; Prog@ndy
    Func _SHLV_PopulateLocalListView($hListView1,ByRef $DIRECTORY_LOCAL)
    If Not IsHWnd($hListView1) Then $hListView1 = GUICtrlGetHandle($hListView1)
    If $DIRECTORY_LOCAL = "" Then
    Local $drives = DriveGetDrive("ALL")
    GUICtrlSetData($inpLocalDirectory, "Drive Selection")
    _GUICtrlListView_BeginUpdate($hListView1)
    _GUICtrlListView_DeleteAllItems($hListView1)
    For $i = 1 To $drives[0]
    _GUICtrlListView_AddItem($hListView1, StringUpper($drives[$i]) & "\", _GUIImageList_GetFileIconIndex($drives[$i] & "\"))
    Next
    _GUICtrlListView_EndUpdate($hListView1)
    Return
    EndIf
    If StringRight($DIRECTORY_LOCAL, 1) <> "\" Then $DIRECTORY_LOCAL &= "\"
    If DriveStatus(StringLeft($DIRECTORY_LOCAL, 3)) <> "READY" Then Return 0 * MsgBox(16 + 8192, 'Error on Drive Access', "Drive " & StringLeft($DIRECTORY_LOCAL, 3) & " not ready!")
    GUICtrlSetData($inpLocalDirectory, $DIRECTORY_LOCAL)
    $files = _SHLV__FileListToArray2($DIRECTORY_LOCAL, "*.*", 2)
    _GUICtrlListView_BeginUpdate($hListView1)
    _GUICtrlListView_DeleteAllItems($hListView1)
    Local $foldercount = 0
    _GUICtrlListView_AddItem($hListView1, "< .. >", $FOLDERUP_ICON_INDEX)
    If IsArray($files) Then
    _GUICtrlListView_SetItemCount($hListView1,$files[0]+1)
    $foldercount = $files[0]+1
    For $i = 1 To $files[0]
    $item = _GUICtrlListView_AddItem($hListView1, $files[$i], $FOLDER_ICON_INDEX)
    _GUICtrlListView_AddSubItem($hListView1, $item, __SHLV_FormatFilesize(DirGetSize($DIRECTORY_LOCAL & $files[$i], 2)), 2)
    Next
    EndIf
    $files = _SHLV__FileListToArray2($DIRECTORY_LOCAL, "*.*", 1)
    _GUICtrlListView_EndUpdate($hListView1)
    _GUICtrlListView_BeginUpdate($hListView1)
    If IsArray($files) Then
    _GUICtrlListView_SetItemCount($hListView1,$files[0]+$foldercount)
    For $i = 1 To $files[0]
    $item = _GUICtrlListView_AddItem($hListView1, $files[$i], _GUIImageList_GetFileIconIndex($files[$i]))
    _GUICtrlListView_AddSubItem($hListView1, $item, __SHLV_FileDateString2Calc(FileGetTime($DIRECTORY_LOCAL & $files[$i], 0, 1)), 1)
    _GUICtrlListView_AddSubItem($hListView1, $item, __SHLV_FormatFilesize(FileGetSize($DIRECTORY_LOCAL & $files[$i])), 2)
    Next
    EndIf
    _GUICtrlListView_EndUpdate($hListView1)
    EndFunc ;==>_SHLV_PopulateLocalListView

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

    ; Prog@ndy
    Func __SHLV_FormatFilesize($size)
    Select
    Case $size > 1000
    Return Round($size / 1024, 1) & " KB"
    Case $size > 1048500
    Return Round($size / 1048576, 1) & " MB"
    Case Else
    Return $size & " Byte"
    EndSelect
    EndFunc ;==>_FormatFilesize

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

    ; Prog@ndy
    Func _GUIImageList_GetSystemImageList($bLargeIcons = False)
    Local $dwFlags, $hIml, $FileInfo = DllStructCreate($tagSHFILEINFO)

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

    $dwFlags = BitOR($SHGFI_USEFILEATTRIBUTES, $SHGFI_SYSICONINDEX)
    If Not ($bLargeIcons) Then
    $dwFlags = BitOR($dwFlags, $SHGFI_SMALLICON)
    EndIf

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

    ;~ '// Load the image list - use an arbitrary file extension for the
    ;~ '// call to SHGetFileInfo (we don't want to touch the disk, so use
    ;~ '// FILE_ATTRIBUTE_NORMAL && SHGFI_USEFILEATTRIBUTES).
    $hIml = _WinAPI_SHGetFileInfo(".txt", $FILE_ATTRIBUTE_NORMAL, _
    DllStructGetPtr($FileInfo), DllStructGetSize($FileInfo), $dwFlags)

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

    Return $hIml
    EndFunc ;==>_GUIImageList_GetSystemImageList

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

    ; Prog@ndy
    Func _WinAPI_SHGetFileInfo($pszPath, $dwFileAttributes, $psfi, $cbFileInfo, $uFlags)
    Local $return = DllCall("shell32.dll", "DWORD*", "SHGetFileInfo", "str", $pszPath, "DWORD", $dwFileAttributes, "ptr", $psfi, "UINT", $cbFileInfo, "UINT", $uFlags)
    If @error Then Return SetError(@error, 0, 0)
    Return $return[0]
    EndFunc ;==>_WinAPI_SHGetFileInfo

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

    ; Prog@ndy
    Func _GUIImageList_GetFileIconIndex($sFileSpec, $bLargeIcons = False, $bForceLoadFromDisk = False)
    Local $dwFlags, $FileInfo = DllStructCreate($tagSHFILEINFO)

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

    $dwFlags = $SHGFI_SYSICONINDEX
    If $bLargeIcons Then
    $dwFlags = BitOR($dwFlags, $SHGFI_LARGEICON)
    Else
    $dwFlags = BitOR($dwFlags, $SHGFI_SMALLICON)
    EndIf
    ;~ ' We choose whether to access the disk or not. If you don't
    ;~ ' hit the disk, you may get the wrong icon if the icon is
    ;~ ' not cached. But the speed is very good!
    If Not $bForceLoadFromDisk Then
    $dwFlags = BitOR($dwFlags, $SHGFI_USEFILEATTRIBUTES)
    EndIf

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

    ;~ ' sFileSpec can be any file. You can specify a
    ;~ ' file that does not exist and still get the
    ;~ ' icon, for example sFileSpec = "C:\PANTS.DOC"
    Local $lR = _WinAPI_SHGetFileInfo( _
    $sFileSpec, $FILE_ATTRIBUTE_NORMAL, DllStructGetPtr($FileInfo), DllStructGetSize($FileInfo), _
    $dwFlags _
    )

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

    If ($lR = 0) Then
    Return SetError(1, 0, -1)
    Else
    Return DllStructGetData($FileInfo, "iIcon")
    EndIf
    EndFunc ;==>_GUIImageList_GetFileIconIndex

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

    ; Author(s): Prog@ndy
    Func __SHLV_FileDateString2Calc($filedate)
    Return StringRegExpReplace($filedate, "(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})", "$1/$2/$3 $4:$5:$6")
    EndFunc ;==>_FileDateString2Calc
    ; Author(s): Prog@ndy
    Func __SHLV_CalcDate2FileDateString($calcdate)
    Return StringRegExpReplace($calcdate, "(\d{4})/(\d{2})/(\d{2}) (\d{2})(IMG:http://www.autoitscript.com/forum/style_em…/autoit/sad.gif) \d{2})(IMG:http://www.autoitscript.com/forum/style_em…/autoit/sad.gif) \d{2})", "$1$2$3$4$5$6")
    EndFunc ;==>_CalcDate2FileDateString

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

    ; Prog@ndy
    Func _SHLV_WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
    #forceref $hWnd, $iMsg, $iwParam
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $tInfo, $hListView1 = $SHELLLISTVIEWHANDLE

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

    $tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")
    Switch $hWndFrom
    Case $hListView1
    Local $nIndex = -2
    Switch $iCode
    Case $NM_RETURN
    ConsoleWrite("jkjkjkjkjl hj lu" & @CRLF)
    $nIndex = _GUICtrlListView_GetSelectedIndices($hListView1,True)
    If IsArray($nIndex) And $nIndex[0]=1 Then
    $nIndex = $nIndex[1]
    ContinueCase
    EndIf
    Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button
    If $nIndex = -2 Then
    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    DllStructGetData($tInfo, "Index")
    EndIf
    ;~ _DebugPrint("$NM_DBLCLK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    ;~ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _
    ;~ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
    Local $ItemText = _GUICtrlListView_GetItemText($hListView1, $nIndex, 0)
    If StringInStr(FileGetAttrib($DIRECTORY_LOCAL&$ItemText),"D") Then
    $DIRECTORY_LOCAL &= $ItemText
    _SHLV_PopulateLocalListView($ListView1,$DIRECTORY_LOCAL)
    ElseIf StringRegExp($ItemText, "\A[A-Za-z]:\\\Z") Then
    $DIRECTORY_LOCAL = $ItemText
    _SHLV_PopulateLocalListView($ListView1,$DIRECTORY_LOCAL)
    ElseIf $ItemText = "< .. >" Then
    Local $slash = StringInStr($DIRECTORY_LOCAL, "\", 1, -2)
    If $slash Then
    $DIRECTORY_LOCAL = StringLeft($DIRECTORY_LOCAL, $slash)
    ElseIf StringRegExp($DIRECTORY_LOCAL, "\A[A-Za-z]:\\\Z") Then
    $DIRECTORY_LOCAL = ""
    EndIf
    _SHLV_PopulateLocalListView($ListView1,$DIRECTORY_LOCAL)
    Else
    If MsgBox(36, "ShellListView", "Soll diese Datei geöffnet werden? " & @CRLF & $DIRECTORY_LOCAL&$ItemText) = 6 Then
    ShellExecute($DIRECTORY_LOCAL&$ItemText,"", $DIRECTORY_LOCAL)
    EndIf
    EndIf
    ; No return value
    EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_NOTIFY

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

    ; Author ........: SolidSnake <MetalGX91 at GMail dot com>
    ; Modified by Prog@ndy
    Func _SHLV__FileListToArray2($sPath, $sFilter = "*", $iFlag = 0)
    Local $hSearch, $sFile, $asFileList
    If Not FileExists($sPath) Then Return SetError(1, 1, "")
    If (StringInStr($sFilter, "\")) Or (StringInStr($sFilter, "/")) Or (StringInStr($sFilter, ":")) Or (StringInStr($sFilter, ">")) Or (StringInStr($sFilter, "<")) Or (StringInStr($sFilter, "|")) Or (StringStripWS($sFilter, 8) = "") Then Return SetError(2, 2, "")
    If Not ($iFlag = 0 Or $iFlag = 1 Or $iFlag = 2) Then Return SetError(3, 3, "")
    If (StringMid($sPath, StringLen($sPath), 1) = "\") Then $sPath = StringTrimRight($sPath, 1) ; needed for Win98 for x:\ root dir
    $hSearch = FileFindFirstFile($sPath & "\" & $sFilter)
    If $hSearch = -1 Then Return SetError(4, 4, "")
    While 1
    $sFile = FileFindNextFile($hSearch)
    If @error Then
    SetError(0)
    ExitLoop
    EndIf
    If $iFlag = 1 And StringInStr(FileGetAttrib($sPath & "\" & $sFile), "D") <> 0 Then ContinueLoop
    If $iFlag = 2 And StringInStr(FileGetAttrib($sPath & "\" & $sFile), "D") = 0 Then ContinueLoop
    $asFileList &= $sFile & @CR
    WEnd
    FileClose($hSearch)
    If Not $asFileList Then
    Dim $asFileList[1]=[0]
    Return SetError(1,0,$asFileList)
    EndIf
    Return StringSplit(StringTrimRight($asFileList,1),@CR)
    EndFunc ;==>_SHLV__FileListToArray2

    [/autoit]
  • Ja Danke, jetzt funktioniert das Enter ($NM_RETURN) aber nun geht das $NM_DBLCLK nicht mehr.
    Ich habe schon versucht abe bei mir funktionieren bede Funktionen nicht miteinander also dass man alle zwei verwenden kann!
    :S