故:将代码中的 list 全部更改为: tree, 即可:HotKeySet("o", "GetFocusedFullPath")
Func GetFocusedFullPath()
$ListViewHWnd = ControlGetHandle("", "", "SysTreeView321");SysListView321")
$ItemSelectedId = ControlTreeView("", "", $ListViewHWnd, "GetSelected");ControlListView("", "", $ListViewHWnd, "GetSelected")
$ItemText = ControlTreeView("", "", $ListViewHWnd, "GetText", $ItemSelectedId);ControlListView("", "", $ListViewHWnd, "GetText", $ItemSelectedId)
$Path = ControlGetText("", "", "Edit1")
MsgBox(0, "", $Path & $ItemText)
EndFunc ;==>GetFocusedFullPath
While 1
Sleep(1000)
WEnd
|