请看代码:#include <GuiTreeView.au3>
$w="[CLASS:TdxW_MainFrame_Class]"
$id_TreeView="[id:59650]"
$id_listView="[id:100]"
WinActivate ($w)
WinWait($w, "", 5)
$h_TreeView = ControlGetHandle($w, "",$id_TreeView )
;select TreeView item AA
ControlTreeView($w, "", $id_TreeView, "Select", "AA")
$h_treeItem=_GUICtrlTreeView_GetSelection($h_TreeView )
_GUICtrlTreeView_ClickItem($h_TreeView , $h_treeItem, "left", False, 1)
$h_listview_1=ControlGetHandle($w, "",$id_listView );get correct listvieew handle
$itemtext_1=ControlListView ($w, "", $id_listView, "GetText" ,0,0);get correct text
;select TreeView item BB
ControlTreeView($w, "", $id_TreeView, "Select", "BB")
$h_treeItem=_GUICtrlTreeView_GetSelection($h_TreeView )
_GUICtrlTreeView_ClickItem($h_TreeView , $h_treeItem, "left", False, 1)
$h_listview_2=ControlGetHandle($w, "",$id_listView );get wrong listvieew handle
$itemtext_2=ControlListView ($w, "", $id_listView, "GetText" ,0,0);get wrong text
|