Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read Text In Dropdown Box?
#4
I tested with the first combo in http://www.racing-index.com/tipsters/ti ... rmance.php

In the Accessible Object Dialog, make to show all objects, and to find hidden objects. Find the combo. In the object tree it has a child LIST object and the list has many LISTITEM objects. Select one. Click OK. Then use DoDefaultAction to select it.
Macro Macro1235
Code:
Copy      Help
Acc a=acc("1st On Racing" "LISTITEM" win("Tipster Proofed Results - Mozilla Firefox" "MozillaUIWindowClass") "MozillaUIWindowClass" "" 0x1011)
a.DoDefaultAction

The above macro is slow, because there are many hidden objects, but can be made faster. Find the combo or an object near it, and navigate to the first listitem. Then enumerate all items, compare name, and DoDefaultAction when it matches name that you need.
Macro Macro1235
Code:
Copy      Help
Acc a=acc("Tipster:" "TEXT" win("Tipster Proofed Results - Mozilla Firefox" "MozillaUIWindowClass") "MozillaUIWindowClass" "" 0x1881 0x40 0x20000040 "next2 first2")
rep
,str s=a.Name
,;out s
,if(a.Name="1st On Racing")
,,a.DoDefaultAction
,,break
,a.Navigate("next"); err break

This is easier. At first find the combo. Search skipping hidden objects. Then find the listitem, but search only in the combo instead of whole window. Search including hidden objects.
Macro Macro1235
Code:
Copy      Help
Acc a=acc("Tipster:" "TEXT" win("Tipster Proofed Results - Mozilla Firefox" "MozillaUIWindowClass") "MozillaUIWindowClass" "" 0x1881 0x40 0x20000040 "next2")
a=acc("1st On Racing" "LISTITEM" a "" "" 16)
a.DoDefaultAction


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)