文字列を検索します。
#Include <GuiListBox.au3>
_GUICtrlListBox_FindString($hWnd, $sText[, $fExact = False])
パラメータ
| $hWnd | コントロールのハンドル | 
| $sText | 検索文字列 | 
| $fExact | [オプション]完全一致かどうか | 
返し値
| 成功: | アイテムのゼロ始まりのインデックス | 
| 失敗: | -1 | 
注意
リストボックス内の指定された文字列ではじまる最初の文字列を見つけます。
関連
_GUICtrlListBox_FindInText, _GUICtrlListBox_SelectString
例
#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GUIListBox.au3>
#include <GuiConstantsEx.au3>
Opt('MustDeclareVars', 1)
$Debug_LB = False ; ListBox関数に渡されるClassNameを調べる。動作を確認するにはTrueを設定し、他のコントロールのハンドルを使用
Example()
Example2()
Func Example()
    Local $iIndex, $hListBox
    ; GUIを作成
    GUICreate("List Box Find String", 400, 296)
    $hListBox = GUICtrlCreateList("", 2, 2, 396, 296)
    GUISetState()
    ; 文字列を追加
    _GUICtrlListBox_BeginUpdate($hListBox)
    For $iI = 1 To 9
        _GUICtrlListBox_AddString($hListBox, StringFormat("%03d : Random string", Random(1, 100, 1)))
    Next
    _GUICtrlListBox_InsertString($hListBox, "eXaCt tExT", 3)
    _GUICtrlListBox_EndUpdate($hListBox)
    ; アイテムを見つける
    $iIndex = _GUICtrlListBox_FindString($hListBox, "exa")
    _GUICtrlListBox_SetCurSel($hListBox, $iIndex)
    ; ユーザーが終了するまでループ
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>Example
Func Example2()
    Local $iIndex, $hListBox
    ; GUIを作成
    GUICreate("List Box Find String Exact", 400, 296)
    $hListBox = GUICtrlCreateList("", 2, 2, 396, 296)
    GUISetState()
    ; 文字列を追加
    _GUICtrlListBox_BeginUpdate($hListBox)
    For $iI = 1 To 9
        _GUICtrlListBox_AddString($hListBox, StringFormat("%03d : Random string", Random(1, 100, 1)))
    Next
    _GUICtrlListBox_InsertString($hListBox, "eXa", 2)
    _GUICtrlListBox_InsertString($hListBox, "eXaCt tExT", 3)
    _GUICtrlListBox_EndUpdate($hListBox)
    ; アイテムを見つける
    $iIndex = _GUICtrlListBox_FindString($hListBox, "exact text", True)
    _GUICtrlListBox_SetCurSel($hListBox, $iIndex)
    ; ユーザーが終了するまでループ
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>Example2