05-11-2015, 05:51 AM
Selecting items of a SysListView32 control often fails if the control is not focused.
Solution: focus the control. Or don't use the "focus" flag with Select.
Example:
Macro Macro2514
And check "+ invisible".
Solution: focus the control. Or don't use the "focus" flag with Select.
Example:
Macro Macro2514
int w=win("FileZilla" "wxWindowNR")
act w
Acc a.Find(w "LISTITEM" "download.html" "class=SysListView32[]id=-31781" 0x1015)
;focus the parent control
int c=child(a)
act c
;also you can scroll the item into view
SendMessage c LVM_ENSUREVISIBLE a.elem-1 0
a.Select(3)
;a.Select(2) ;;without "focus" flag, does not fail even if the control is not focused