搜索指定参数值的项目
#Include <GuiListView.au3>
_GUICtrlListView_FindParam($hWnd, $iParam[, $iStart = -1])
| $hWnd | 控件句柄 | 
| $iParam | 搜索的参数值 | 
| $iStart | 	[可选参数] 搜索开始的 0 基索引,或 -1, 从头开始. 指定索引项自身不包括在搜索范围内.  | 
  
| 成功: | 返回项目的 0 基索引 | 
| 失败: | 返回 -1 | 
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
$Debug_LV = False ; 检查传递给 ListView 函数的类名, 设置为True并输出到一个控件的句柄,用于检查它是否工作
; Warning should not use SetItemParam on items created with GuiCtrlCreateListViewItem
; Param is the controlId of the item
_Main()
Func _Main()
    Global $GUI, $iI, $hListView
    ; 创建 GUI
    $GUI = GUICreate("(UDF Created) ListView Find Param", 400, 300)
    $hListView = _GUICtrlListView_Create($GUI, "", 2, 2, 394, 268)
    GUISetState()
    ; 添加列
    _GUICtrlListView_AddColumn($hListView, "Items", 100)
    ; 添加项目
    _GUICtrlListView_BeginUpdate($hListView)
    For $iI = 1 To 100
        _GUICtrlListView_AddItem($hListView, "Item " & $iI)
    Next
    _GUICtrlListView_EndUpdate($hListView)
    ; Set item 50 parameter value
    _GUICtrlListView_SetItemParam($hListView, 49, 1234)
    ; Search for target item
    $iI = _GUICtrlListView_FindParam($hListView, 1234)
    MsgBox(4160, "信息", "Target Item Index: " & $iI)
    _GUICtrlListView_EnsureVisible($hListView, $iI)
    ; 循环直到用户退出
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Main