Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extract Information from Selected Accessible Object
#1
I have a way to extract a certain number reliably from a list of LISTITEMS. I can go through them sequentially from the top of the list using the "next" navigation string

but how would I do it if I just wanted to send the selected item(s) i.e. one or more

I suppose I would also need a way to initially find out how many members there are in the list (total) or in the selected portion of the list.

Selection, by the way, is by the usual Windows method of single-clicking (or ctrl-single clicking for multiples)


this is the acc statement

Code:
Copy      Help
Acc a=acc("" "LISTITEM" win("Sample App Name" "WindowsForms10.Window.8.app.0.378734a") "WindowsForms10.SysListView32.app.0.378734a" "" 0x1408 0 0 "")

;1st item in the list--------------

str description=a.Description
str accession
findrx(description "\d{8}" 0 0 accession)
out accession
0.3

;2nd item in the list -------------------------
a=acc("" "LISTITEM" win("Sample App Name" "WindowsForms10.Window.8.app.0.378734a") "WindowsForms10.SysListView32.app.0.378734a" "" 0x1408 0 0 "next"); err ret
description=a.Description
findrx(description "\d{8}" 0 0 accession)
out accession

Thanks for any advice.

Stuart
#2
Code:
Copy      Help
Acc a=acc("" "LIST" win("WINDOWS" "ExploreWClass") "SysListView32" "" 0x1000)
ARRAY(Acc) r; int i
a.Selection(r)
for i 0 r.len
,out r[i].Name


Forum Jump:


Users browsing this thread: 1 Guest(s)