InjectBrowserMouseDown: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 21: Line 21:
<syntaxhighlight lang="lua">addEventHandler("onClientClick", root,
<syntaxhighlight lang="lua">addEventHandler("onClientClick", root,
function(button, state)
function(button, state)
if state == "down" then
if state == "down" then
injectBrowserMouseDown(browser, button)
injectBrowserMouseDown(browser, button)
else
else
injectBrowserMouseUp(browser, button)
injectBrowserMouseUp(browser, button)
end  
end  
end  
end  
end</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==

Revision as of 22:02, 12 May 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(...)
Counterpart: injectBrowserMouseDown


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

Todo

See also