本帖最后由 happytc 于 2011-12-19 21:38 编辑
回复 7# xiaochuan
不过,若是list/ListBox/ListView的,你的要求很容易实现。如5#的图
要使test1.au3文件选中,可以用如下代码
#include <GuiListView.au3>
Local $hWnd, $hCtrl, $aText
$hWnd = WinGetHandle("[CLASS:CabinetWClass]")
$hCtrl = ControlGetHandle($hWnd, "", "SysListView321")
WinActivate($hWnd)
For $i = 0 to _GUICtrlListView_GetItemCount($hCtrl) - 1
$aText = _GUICtrlListView_GetItem($hCtrl, $i)
If IsArray($aText) And $aText[3] == "test1.au3" Then
_GUICtrlListView_SetItemSelected($hCtrl, $i, True, True)
ExitLoop
EndIf
Next
|