Mouse position: Difference between revisions
Content added Content deleted
Line 127: | Line 127: | ||
return</lang> |
return</lang> |
||
with User32.dll\GetCursorPos |
with User32.dll\GetCursorPos |
||
<lang AutoHotkey> |
<lang AutoHotkey>GetCursorPos() |
||
GetCursorPos() |
|||
{ |
{ |
||
static POINT, init := VarSetCapacity(POINT, 8, 0) && NumPut(8, POINT, "Int") |
static POINT, init := VarSetCapacity(POINT, 8, 0) && NumPut(8, POINT, "Int") |
||
Line 141: | Line 140: | ||
. "POINT structure`n`n" |
. "POINT structure`n`n" |
||
. "x-coordinate:`t`t" GetCursorPos[0] "`n" |
. "x-coordinate:`t`t" GetCursorPos[0] "`n" |
||
. "y-coordinate:`t`t" GetCursorPos[1] |
. "y-coordinate:`t`t" GetCursorPos[1]</lang> |
||
with User32.dll\GetPhysicalCursorPos |
|||
</lang> |
|||
<lang AutoHotkey>GetPhysicalCursorPos() |
|||
{ |
|||
static POINT, init := VarSetCapacity(POINT, 8, 0) && NumPut(8, POINT, "Int") |
|||
if (DllCall("User32.dll\GetPhysicalCursorPos", "Ptr", &POINT)) |
|||
{ |
|||
return, { 0 : NumGet(POINT, 0, "Int"), 1 : NumGet(POINT, 4, "Int") } |
|||
} |
|||
} |
|||
GetPhysicalCursorPos := GetPhysicalCursorPos() |
|||
MsgBox, % "GetPhysicalCursorPos function`n" |
|||
. "POINT structure`n`n" |
|||
. "x-coordinate:`t`t" GetPhysicalCursorPos[0] "`n" |
|||
. "y-coordinate:`t`t" GetPhysicalCursorPos[1]</lang> |
|||
=={{header|BBC BASIC}}== |
=={{header|BBC BASIC}}== |