02-06-2009, 09:38 PM
Maybe easier would be to click button, then let the macro wait for another click... I often do it. For example, this macro deletes a music file in winamp library and scrolls to the next item.
Macro
Toolbar
Macro
OnScreenDisplay "click the item in 10 seconds"
wait 10 ML; err ret
OsdHide
int hlv=child(mouse)
Acc a=acc("" "LIST" hlv "" "" 0x1000); err ret
ARRAY(Acc) aa
a.Selection(aa)
if(!aa.len) ret
a=aa[0]
a.Mouse(2)
wait 5 WV "+#32768"
key rrrRp
0.5
a.Select(2) ;;now a is first element after deleted element
SendMessage hlv LVM_ENSUREVISIBLE a.elem 0
Toolbar