It's posible to read the detail in ListView using macro?
ex. need to know the detail in col 2 then my macro can click the row correctly in ListView.
Try using Accessible object action, the control is SysListView32 and only can detect the row, not the value in cell.
need help please.
Normally accessible object's Description contains text of all cells in the row, plus column header text. Needs to parse the string to get text of a cell.
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
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.
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
Thanks for the help Gintaras, but still can not read the value,
using method no.3 to show all items and cells, the result can count the total line, but the item in cell is blank, try using method 2 and 1 still same blank also.
do i need another options parameters in syntac line?
need your assist, thank you.
Thanks for the help Gintaras, but still can not read the value,
using method no.3 to show all items and cells, the result can count the total line, but the item in cell is blank, try using method 2 and 1 still same blank also.
do i need another options parameters in syntac line?
need your assist, thank you.
Create CSV file. Use ICsv interface for it.
Get header item text with accessible object functions.
Get listview item/subitem text with GetListViewItemText.
Item count = SendMessage(hlv LVM_GETITEMCOUNT 0 0).
out ARRAY(str) a int w1=child(1001"List4""SysListView32"win("Winamp""BaseWindow_RootWnd")) int i j LvGetAll2 w1 a for i 0 a.len ,out"'%s' '%s' '%s'" a[0 i] a[1 i] a[2 i]