Posts: 5
Threads: 3
Joined: Feb 2011
If my desktop screen has four rectangles. Each time I make a right click it selects the next rectangle. How would I do this with a macro. This is a simplified description. Actually each box has a weather image that displays with motion. I need to know how by clicking one of the buttons on the mouse it selects the next rectangle. Thanks!
Posts: 12,140
Threads: 142
Joined: Dec 2002
Function
click_4_rectangles
;add tray icon
AddTrayIcon "$qm$\mouse.ico" "Macro ''click_4_rectangles''.[]To end macro, Ctrl+click me."
;
;create array with coordinates of mouse clicks. Change the values.
ARRAY(POINT) a.create(4)
a[0].x=100
a[0].y=100
a[1].x=500
a[1].y=100
a[2].x=500
a[2].y=300
a[3].x=100
a[3].y=300
;wait for user right click, and click next point from the array
;g1
int i
for i 0 a.len
,wait 0 MR
,lef a[i].x a[i].y
goto g1