Mouse position: Difference between revisions
Content deleted Content added
ActionScript implementation |
|||
Line 126:
Traytip, Mouse position, x: %x%`ny: %y%`rWindow: %WinTitle%, 4 ; Displays the info as a Traytip for 4 seconds
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}}==
|