Just very simple but universal/usefull function to get all content of TreeView from external application.
It's not optimized for speed and error testing is missing, it's just for very simple code ;-)
#Include <String.au3>
#Include <GuiTreeView.au3>
; "C:\Program Files (x86)\Resource Kit\oleview.exe"
; COM Library Objects --> ClassMoniker
$sAll = _TreeView_GetAll('OLE/COM Object Viewer', '', 'SysTreeView322')
FileDelete('treeview_get_all.txt')
FileWrite('treeview_get_all.txt', $sAll)
;~ClipPut($sAll)
Func _TreeView_GetAll($title, $text, $classNN, $expand = False, $indent = ' ', $bullet = '') ; $bullet = '- '
$sAll = ''
$hWnd = ControlGetHandle($title, $text, $classNN)
If $expand Then _GUICtrlTreeView_Expand($hWnd) ; Expand All
$hItem = _GUICtrlTreeView_GetFirstItem($hWnd)
While $hItem <> 0x00000000
$sItem = _GUICtrlTreeView_GetText($hWnd, $hItem)
$level = _GUICtrlTreeView_Level($hWnd, $hItem)
$sIndent = _StringRepeat($indent, $level)
$sAll &= $sIndent & $bullet & $sItem & @CRLF
$hItem = _GUICtrlTreeView_GetNext($hWnd, $hItem)
WEnd
Return $sAll
EndFunc
Hope it can help somebody ...