;=============================================================================== ; Function Name: _ComboBoxSearch ; Description:: durchsucht alle ComboBox Einträge nach dem Suchbegriff ; Parameter(s): $hWnd Handle der ComboBox ; $sText Suchbegriff ; $iSens Sensitivität 0 = teilweise Übereinstimmung ; 1 = exakte Übereinstimmung ; Requirement(s): aktuelle Beta ; Return Value(s): 2D-Array Array[0][0] enthält die Anzahl der Treffer ; Array[$i][0] = Index in CB-Liste ; Array[$i][1] = Listeneintrag ; Author(s): BugFix (bugfix@autoit.de) ;=============================================================================== #Include Func _ComboBoxSearch($hWnd, $sText, $iSens=0) Local $arMatches[1][2]=[[0,'']], $n = _GUICtrlComboBox_GetCount($hWnd), $val If $iSens < 0 Or $iSens > 1 Then $iSens = 0 For $i = 0 To $n -1 _GUICtrlComboBox_GetLBText($hWnd, $i, $val) If StringInStr($val, $sText, $iSens) Then ReDim $arMatches[UBound($arMatches)+1][2] $arMatches[UBound($arMatches)-1][0] = $i $arMatches[UBound($arMatches)-1][1] = $val $arMatches[0][0] += 1 EndIf Next Return $arMatches EndFunc ;==>_ComboBoxSearch