Macro to display mouse coordination

Share your macros, knowledge, solutions, services, ...
Post Reply
Petr
Posts: 106
Joined: Tue Oct 18, 2016 1:12 pm

Macro to display mouse coordination

Post by Petr » Sat Nov 19, 2016 1:14 pm

This is the macro that displays mouse coordination as you move the mouse. Both absolute and relative to currently active window coordination are displayed. The macro needs to be stopped by "Shift+Esc".

Code: Select all

<cmds><#>
<me_error_nodisplay>
<me_status_window>("Mouse pos",0,1,10,10,200,140)<#>
<label>("REPEAT")<#>
<wininfo>("%_vActiveWindow_HWND%","","0")
<varset>("vrx=EXPR(%_vMousePosX%-%_vWinRectX1%)","")
<varset>("vry=EXPR(%_vMousePosY%-%_vWinRectY1%)","")
<me_status_set>(1,"abs=[%_vMousePosX%,%_vMousePosY%]",4)<#>
<me_status_set>(2,"rel=[%vrx%,%vry%]",4)<#>
<me_status_set>(3,"Shift+Esc to end macro",4)<#>
<wx>(50,0)<#>
<goto>("REPEAT")

Post Reply