InjectBrowserMouseDown: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
m (fix oop)
Line 9: Line 9:
bool injectBrowserMouseDown ( browser webBrowser, string mouseButton )
bool injectBrowserMouseDown ( browser webBrowser, string mouseButton )
</syntaxhighlight>
</syntaxhighlight>
{{OOP||[[Element/Browser|browser]]:injectMouseDown||injectBrowserMouseDown}}
{{OOP||[[Element/Browser|browser]]:injectMouseDown}}


===Required arguments===
===Required arguments===

Revision as of 20:22, 17 December 2015

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

Syntax

bool injectBrowserMouseDown ( browser webBrowser, string mouseButton )

OOP Syntax Help! I don't understand this!

Method: browser:injectMouseDown(...)


Required arguments

  • webBrowser: The web browser
  • mouseButton: The mouse button (Possible values: left, middle, right)

Returns

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

Example

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

See also