Mouse position

From Rosetta Code
Revision as of 19:22, 27 May 2009 by rosettacode>Tinku99 (get mouse position in autohotkey)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Task
Mouse position
You are encouraged to solve this task according to the task description, using any language you may know.

Get the current location of the mouse cursor relative to the active window.

AutoHotkey

<lang AutoHotkey> WinGetTitle, window, A MouseGetPos, x, y Msgbox, the mouse is at xpos %x% ypos %y% in window %window% </lang>