|
如下函数是我刚写的查找ListView的项目 是否有指定字符串“Speakers”的项目 如果有此项目就选中此项目。
我想实现的是再写两个函数 查找在ComBox ,ListBox控件项目中是否有指定字符串“xxx”
的项目如果有此项目就选中此项目。
$TitleMS="Sound"
LoopListView($TitleMS,"[CLASS:SysListView32; INSTANCE:1]","Speakers")
Func LoopListView($tit,$ListView,$Word)
$Count=ControlListView($TitleMS,"",$ListView,"GetItemCount")
For $i=0 to $Count
$StrWord=ControlListView($TitleMS,"",$ListView,"GetText", $i)
IF $StrWord = $Word Then
ControlListView($TitleMS,"",$ListView,"Select",$i)
EndIf
;MsgBox(4096,"String",$StrWord)
Next |
|