Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Buttons as images
#2
Macro Macro1449
Trigger F12     Help - how to add the trigger to the macro
Code:
Copy      Help
;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


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)