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

Function

injectBrowserMouseDown

ClientBrowserIdentical to MTA:SA

Presses a mouse button on the page at the position of the last injectBrowserMouseMove. Two presses at the same spot within 0.5 s reach the page as a double click, three as a triple click (paragraph selection), like in Windows.

Syntax

bool injectBrowserMouseDown(browser webBrowser, string mouseButton [, bool double = false])

Arguments

webBrowserbrowser
The browser.
mouseButtonstring
"left", "middle" or "right".
doublebool, optional = false
Force a double click without a first press.

Returns

true on success.

Example

addEventHandler("onClientClick", root, function(button, state)
    if state == "down" then
        injectBrowserMouseDown(browser, button)
    else
        injectBrowserMouseUp(browser, button)
    end
end)

See also