Difference between revisions of "Lua:getMousePos"

From Cheat Engine
Jump to navigation Jump to search
(Created page with ''''function''' getMousePos() Returns 2 parameters. The x-pos and the y-pos of the mouse on the screen. Example: x,y = getMousePos() ===Function Parameters=== <none> == …')
 
m (Syntax Highlighting.)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
'''function''' getMousePos()
+
[[Category:Lua]]
 +
{{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===
 +
<syntaxhighlight lang="lua" line>
 +
x, y = getMousePos()
 +
</syntaxhighlight>
  
===Function Parameters===
+
{{LuaSeeAlso}}
<none>
 
  
== See also ==
+
{{KeyboardMouse}}
* [[setMousePos]]
 
* [[Lua]]
 

Latest revision as of 20:16, 25 June 2026

<> Lua API Reference

function getMousePos()

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

Function Parameters[edit]

<none>

Example[edit]

1 x, y = getMousePos()

Main Pages

Core Lua documentation entry points

Lua
Script Engine

Mouse Related Functions

Keyboard Related Functions

Global Hotkey Related Functions