Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read Value in SysListView32
#4
Example with GetListViewItemText
Code:
Copy      Help
int hwnd=child("" "SysListView32" win("" "ExploreWClass") 0x1)
str s
GetListViewItemText hwnd 3 s 2 ;;get text of 4-th item (item index 3), 3-d column (column index 2)
out s

Example with accessible objects
Code:
Copy      Help
Acc c=acc("" "LISTITEM" win("" "ExploreWClass") "SysListView32" "" 0x1001)
str s=c.Description
out s
ARRAY(str) a; int i
if(findrx(s "^.+?: (.+?)[,;] .+?: (.+?)[,;] .+?: (.+)" 0 0 a)<0) ret
for i 0 a.len
,out a[i]
,

Each method has advantages and disadvantages. The first is reliable and fast but does not work in exe. The second works in exe but is unreliable because text of some items may be empty or contain separators.

----

This example shows all items and cells
Code:
Copy      Help
int hwnd=child("" "SysListView32" win("" "ExploreWClass") 0x1)
str s; int r c
for r 0 SendMessage(hwnd LVM_GETITEMCOUNT 0 0)
,out "--- row %i ---" r
,for c 0 5
,,if(!GetListViewItemText(hwnd r s c)) s=""
,,out s


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)