Difference between revisions of "Lua:getMousePos"

From Cheat Engine
Jump to navigation Jump to search
m (Reverted edits by This content is not available (Talk) to last revision by TheyCallMeTim13)
m (Added CodeBox Template.)
Line 1: Line 1:
 
[[Category:Lua]]
 
[[Category:Lua]]
'''function''' getMousePos()
+
{{CodeBox|'''function''' getMousePos()}}
  
Returns 2 parameters. The x-pos and the y-pos of the mouse on the screen.
+
Returns 2 parameters: the x-position and y-position of the mouse on the screen.
  
Example:
+
{{LuaFunctionParametersNone}}
  x,y = getMousePos()
 
 
 
  
 
+
===Example===
{{LuaFunctionParametersNone}}
+
<pre>
 +
x, y = getMousePos()
 +
</pre>
  
 
{{LuaSeeAlso}}
 
{{LuaSeeAlso}}
  
=== Related Functions ===
+
{{KeyboardMouse}}
* [[Lua:setMousePos|setMousePos]]
 

Revision as of 23:53, 4 December 2025

<> Lua API Reference

function getMousePos()

Returns 2 parameters: the x-position and y-position of the mouse on the screen.

Function Parameters

<none>

Example

x, y = getMousePos()

Main Pages

Core Lua documentation entry points

Lua
Script Engine

Mouse Related Functions

Keyboard Related Functions

Global Hotkey Related Functions