====== Simulating Moving the Mouse ======

function director:OnPlayerFound(player)
--Once the player is found simulate a mouse move to coordinates x, y. The window handle for the
--player is passed to this function in player
Mouse.SimulateMove(player, xCoordinate, yCoordinate)

Use the director property director:get_BrowserWindow() to return the handle of the browser window.

function director:GetPlayerViewingRectangle(playerSize)
--Can be used in any function within the Director block
browserhWnd = director:get_BrowserWindow()
Mouse.SimulateMove(browserhWnd, xCoordinate, yCoordinate)

--You can also move in the player window using a director property
playerhWnd = director:get_PlayerWindow()
Mouse.SimulateMove(playerhWnd, xCoordinate, yCoordinate)

return Rectangle(0, 0, playerSize.Width, playerSize.Height);


See Also: [[Mouse Click]], [[Director Properties]]