InjectBrowserMouseDown: Difference between revisions
Jump to navigation
Jump to search
m (remove duplicate "see also") |
m (Add missing argument) |
||
(5 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{ | {{Client function}} | ||
{{New feature/item|3.0150|1.5|| | {{New feature/item|3.0150|1.5|| | ||
This function injects a mouse click (state: down). | This function injects a mouse click (state: down). | ||
Line 7: | Line 7: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool injectBrowserMouseDown ( browser webBrowser, string mouseButton ) | bool injectBrowserMouseDown ( browser webBrowser, string mouseButton [, bool doubleClick = false ] ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[Element/Browser|browser]]:injectMouseDown | {{OOP||[[Element/Browser|browser]]:injectMouseDown}} | ||
===Required arguments=== | ===Required arguments=== | ||
*'''webBrowser:''' The web browser | *'''webBrowser:''' The web browser | ||
*'''mouseButton:''' The mouse button (Possible values: ''left'', ''middle'', ''right'') | *'''mouseButton:''' The mouse button (Possible values: ''left'', ''middle'', ''right'') | ||
===Optional arguments=== | |||
{{OptionalArg}} | |||
*'''doubleClick:''' Specifies whether it is a double click or not. | |||
===Returns=== | ===Returns=== | ||
Line 19: | Line 23: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua">addEventHandler("onClientClick", root, | <syntaxhighlight lang="lua"> | ||
addEventHandler("onClientClick", root, | |||
function(button, state) | |||
if state == "down" then | |||
injectBrowserMouseDown(browser, button) | |||
else | |||
injectBrowserMouseUp(browser, button) | |||
end) | end | ||
end | |||
) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See also== | ==See also== | ||
{{CEF_functions}} | {{CEF_functions}} | ||
[[hu:injectBrowserMouseDown]] | |||
[[RO:injectBrowserMouseDown]] |
Latest revision as of 23:00, 1 October 2024
This function injects a mouse click (state: down).
Syntax
bool injectBrowserMouseDown ( browser webBrowser, string mouseButton [, bool doubleClick = false ] )
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)
Optional arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.
- doubleClick: Specifies whether it is a double click or not.
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
- canBrowserNavigateBack
- canBrowserNavigateForward
- createBrowser
- executeBrowserJavascript
- focusBrowser
- getBrowserProperty
- getBrowserSettings
- getBrowserSource
- getBrowserTitle
- getBrowserURL
- injectBrowserMouseDown
- injectBrowserMouseMove
- injectBrowserMouseUp
- injectBrowserMouseWheel
- isBrowserDomainBlocked
- isBrowserFocused
- isBrowserLoading
- isBrowserRenderingPaused
- loadBrowserURL
- navigateBrowserBack
- navigateBrowserForward
- reloadBrowserPage
- requestBrowserDomains
- resizeBrowser
- setBrowserAjaxHandler
- setBrowserProperty
- setBrowserRenderingPaused
- setBrowserVolume
- toggleBrowserDevTools