Input

mousemoveabs

Moves the mouse using Windows absolute mouse input when the Roblox window is active.

Syntax

mousemoveabs(x: number, y: number)

Arguments

NameTypeDescription
xnumberClient-area X coordinate read as a Lua number and converted to an integer before the screen-position and absolute-input scaling step.
ynumberClient-area Y coordinate read as a Lua number and converted to an integer before the screen-position and absolute-input scaling step.

Description

Moves the mouse using Windows absolute mouse input when the Roblox window is active. The x and y arguments are checked as Lua numbers and converted to an integer. Real treats them as coordinates relative to the active foreground window client area, adds that client area screen position with ClientToScreen, scales them using GetSystemMetrics(SM_CXSCREEN/SM_CYSCREEN) - 1 and integer math, then calls mouse input with the requested mouse action. If isrbxactive would be false, the function returns without sending input.

Call it with 2 parameter(s): x, y. The argument table explains which values are required and which ones only refine the behavior.

It does not return data. Treat the call as an action and handle errors around the call site when needed.

Example

Example call with placeholder values.

mousemoveabs(1, 1)