ComboBox.FindItem

number ComboBox.FindItem ( 

string ObjectName,

number StartAfter,

number SearchType,

string SearchText )

Description

Searches through the items in a combobox object for a specific string and returns the index (line number) where it was found.

Parameters

ObjectName

(string) The name of the combobox object.

StartAfter

(number) The index (line number) to start searching after. The search will begin in the next item in the list. You can use an index of -1 (or variable LB_ALLITEMS) to search all combobox items.

SearchType

(number) The type of search to perform:

CONSTANT

VALUE

DESCRIPTION

LB_BYTEXT

0

Search only the item text. (Default)

LB_BYDATA

1

Search only the associated item data.

LB_BYTEXTDATA

2

Search both the item text and item data.

SearchText

(string) The string of text to search for in the combobox object. You can use the * and ? wildcards to search for substrings.

Returns

(number) The index (line number) of the combobox item where the search text was found. If no items are found, or an error occurs, -1 is returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.

See also:  Related Actions