ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. injectBrowserMouseMove

Function

injectBrowserMouseMove

ClientBrowserIdentical to MTA:SA

Moves the mouse cursor on the page.

Syntax

bool injectBrowserMouseMove(browser webBrowser, int posX, int posY)

Arguments

webBrowserbrowser
The browser.
posXint
X position in page pixels.
posYint
Y position in page pixels.

Returns

true on success.

Example

local sw, sh = guiGetScreenSize()
addEventHandler("onClientRender", root, function()
    if isCursorShowing() then
        local cx, cy = getCursorPosition()
        injectBrowserMouseMove(browser, cx * sw, cy * sh)
    end
end)