injectBrowserMouseDown | Multi Theft Auto: Wiki Skip to content

injectBrowserMouseDown

Client-side
Server-side
Shared

This function injects a mouse click (state: down).

OOP Syntax Help! I don't understand this!

  • Method: browser:injectMouseDown(...)

Syntax

bool injectBrowserMouseDown ( browser webBrowser, string mouseButton, [ bool doubleClick = false ] )
Required Arguments
  • webBrowser: The browser.
  • mouseButton: The mouse button (Possible values: left, middle, right).
Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.

  • doubleClick (default: false): Specifies whether it is a double click or not.

Returns

  • bool: result

Returns true if the click was successfully injected, false otherwise.

Code Examples

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