Difference between revisions of "Lua:getMousePos"

From Cheat Engine
Jump to navigation Jump to search
m (Added CodeBox Template.)
m (Syntax Highlighting.)
 
Line 7: Line 7:
  
 
===Example===
 
===Example===
<pre>
+
<syntaxhighlight lang="lua" line>
 
x, y = getMousePos()
 
x, y = getMousePos()
</pre>
+
</syntaxhighlight>
  
 
{{LuaSeeAlso}}
 
{{LuaSeeAlso}}
  
 
{{KeyboardMouse}}
 
{{KeyboardMouse}}

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