Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Web Page Drop Down Box Selection Issue
#8
Macro Macro267
Code:
Copy      Help
a11.Select(1)
int n=a11.CbIndexOf("Business"); if(n<0) end "combo box item not found"
key V ;;Space should show the list
key H D(#n) Y

Member function Acc.CbIndexOf
Code:
Copy      Help
function# $name

;Finds combo box item and returns 0-based index.
;Returns -1 if not found.

;name - item text. Wildcard, case-insensitive.


STRINT si.s=name; si.i=-1
Acc ai.Find(this.a "LISTITEM" "" "" 0x10 0 0 "" &sub.Callback &si)
if(!ai.a) ret -1
ret si.i


#sub Callback
function# Acc&ai level STRINT&r

r.i+1
str s=ai.Name
if(!s.len and r.s.len) s=ai.Value ;;Chrome
ret !matchw(s r.s 1)
err ret 1
Create it with menu File / New / Member Function.


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)