Cursor Position
Moderators: Dorian (MJT support), JRL
Cursor Position
I have been using the Follow Cursor and Relative options but I was wondering if there is a way to add this option into my own macro? So when I start my macro up I automatically have the positions show up next to the cursor?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
This might give you some ideas ... run the script ... you'll see it mirrors closely what the cursor monitor does:
Code: Select all
GetCursorPos>x,y
Dialog>Dialog1
Caption=CursorMon
Width=124
Height=55
Top=%y%
Left=%x%
Max=0
Min=0
Close=0
Resize=0
Label=msLabel1,0,0,true
EndDialog>Dialog1
Show>Dialog1
LibFunc>user32,FindWindowA,dhwnd,TForm,CursorMon
Let>WS_CHILD=1073741824
Let>style=WS_CHILD
LibFunc>user32,SetWindowLongA,sres,dhwnd,-16,style
CloseDialog>Dialog1
Show>Dialog1
Label>mainloop
GetCursorPos>x,y
GetPixelColor>x,y,col
Let>Dialog1.msLabel0=%x%,%y%,%col%
ResetDialogAction>Dialog1
MoveWindow>CursorMon,x,y
Wait>0.02
Goto>mainloop
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?