Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reading and selecting items in a list box
#2
Can be used LB_x functions or accessible object functions. Example with LB_x functions:

Code:
Copy      Help
int hwnd=child("" "WindowsForms10.LISTBOX.app.0.378734a" win("Form1" "WindowsForms10.Window.8.app.0.378734a") 0x1)
int i
str s
for i 0 LB_GetCount(hwnd)
,LB_GetItemText(hwnd i s)
,out s

LB_SelectItem hwnd 2

Example with accessible object functions:
Code:
Copy      Help
Acc a=acc("" "LIST" win("Form1" "WindowsForms10.Window.8.app.0.378734a") "WindowsForms10.LISTBOX.app.0.378734a" "" 0x1000)
for a.elem 1 10000000
,str s=a.Name; err break
,out s


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)