08-29-2010, 01:15 PM
Macro Macro1449
Trigger F12
Trigger F12

;define 2 rectangles for testing: one at top-left corner, and another at right from it, both 20x20
RECT ra rb
ra.left=0; ra.top=0; ra.right=20; ra.bottom=20
rb=ra; OffsetRect &rb 20 0
;get mouse coordinates
POINT p
xm p
;test
int Action
if PtInRect(&ra p.x p.y)
,Action=1
else if PtInRect(&rb p.x p.y)
,Action=2
;result
out Action