Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OSD grid lines
#5
Macro OSD mouse circle
Code:
Copy      Help
;As you move the mouse, draws circle around mouse pointer. Click to stop.

int rad=32 ;;change this
;_________________________

POINT p pp
rep
,ifk((1)) break
,0.01
,xm p
,if(!memcmp(&pp &p sizeof(POINT))) continue
,pp=p
,int h=OnScreenDraw(p.x-rad p.y-rad rad*2 rad*2 &OSD_ProcExample3 0 80 1 0 h)

Function OSD_ProcExample3
Code:
Copy      Help
;/
function hwnd hdc cx cy param

int hpen oldpen

hpen=CreatePen(0 2 0xff0000); oldpen=SelectObject(hdc hpen)
Ellipse hdc 0 0 cx cy
DeleteObject SelectObject(hdc oldpen)

______________________________________

Macro OSD line static
Code:
Copy      Help
OnScreenDisplay "Click 2 times. The macro will draw line between clicks." 3

;wait for 2 clicks and get their coordinates
POINT p1 p2
wait 0 ML
xm p1
wait 0 ML
xm p2

;draw line
int color=ColorFromRGB(255 0 0)
OnScreenLine(p1.x p1.y p2.x p2.y color 2)

wait 5


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)