InjectBrowserMouseMove: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 20: Line 20:


==Example==
==Example==
<syntaxhighlight lang="lua">function onCursorMove ( relativeX , relativeY , absoluteX , absoluteY )  
<syntaxhighlight lang="lua">
injectBrowserMouseMove ( browser , absoluteX , absoluteY )  
addEventHandler("onClientCursorMove", root,
end  
    function (relativeX, relativeY, absoluteX, absoluteY)
addEventHandler ( "onClientCursorMove" , root , onCursorMove )</syntaxhighlight>
        injectBrowserMouseMove(browser, absoluteX, absoluteY)
 
    end
==See Also==
)
Todo
</syntaxhighlight>


==See also==
==See also==
Line 32: Line 32:


[[hu:injectBrowserMouseMove]]
[[hu:injectBrowserMouseMove]]
[[RO:injectBrowserMouseMove]]

Latest revision as of 08:29, 20 April 2020

This function injects a mouse movement.

Syntax

bool injectBrowserMouseMove ( browser webBrowser, int posX, int posY )

OOP Syntax Help! I don't understand this!

Method: browser:injectMouseMove(...)


Required arguments

  • webBrowser: The browser which will retrieve the mouse movement
  • posX: Absolute X screen coordinate
  • posY: Absolute Y screen coordinate

Returns

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

Example

addEventHandler("onClientCursorMove", root,
    function (relativeX, relativeY, absoluteX, absoluteY)
        injectBrowserMouseMove(browser, absoluteX, absoluteY)
    end
)

See also