Mouse position: Difference between revisions
Content added Content deleted
(ActionScript implementation) |
|||
Line 126: | Line 126: | ||
Traytip, Mouse position, x: %x%`ny: %y%`rWindow: %WinTitle%, 4 ; Displays the info as a Traytip for 4 seconds |
Traytip, Mouse position, x: %x%`ny: %y%`rWindow: %WinTitle%, 4 ; Displays the info as a Traytip for 4 seconds |
||
return</lang> |
return</lang> |
||
with User32.dll\GetCursorPos |
|||
<lang AutoHotkey> |
|||
GetCursorPos() |
|||
{ |
|||
static POINT, init := VarSetCapacity(POINT, 8, 0) && NumPut(8, POINT, "Int") |
|||
if (DllCall("User32.dll\GetCursorPos", "Ptr", &POINT)) |
|||
{ |
|||
return, { 0 : NumGet(POINT, 0, "Int"), 1 : NumGet(POINT, 4, "Int") } |
|||
} |
|||
} |
|||
GetCursorPos := GetCursorPos() |
|||
MsgBox, % "GetCursorPos function`n" |
|||
. "POINT structure`n`n" |
|||
. "x-coordinate:`t`t" GetCursorPos[0] "`n" |
|||
. "y-coordinate:`t`t" GetCursorPos[1] |
|||
</lang> |
|||
=={{header|BBC BASIC}}== |
=={{header|BBC BASIC}}== |