|
3#
楼主 |
发表于 2008-7-11 16:06:16
|
只看该作者
自己答一下 只不过以下代码还没测过 等下再测下- 'select the first item in the list matchs the regular expression
- Public Function FuzzySelect(test_object, strPattern)
- itemCount = test_object.Object.getItemCount() 'Get item count
- For i=0 to itemCount
- strItem = test_object.GetItem(i)
- If ValidateString(strPattern, strItem) Then 'Compare by regular expression
- test_object.Select "#"&i
- Exit For
- End If
- Next
- End Function
- RegisterUserFunc "JavaList", "FuzzySelect", "FuzzySelect",True
复制代码
[ 本帖最后由 dottree 于 2008-7-11 16:31 编辑 ] |
|