====== Simulating a Mouse Click ======


--[[Director
function director:OnPlayerFound(player)
--Once the player is found simulate a mouse click at coordinates x, y. The window handle for the
--player is passed to this function in player
Mouse.SimulateClick(player, xCoordinate, yCoordinate)
end
EndDirector]]--


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

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

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

return Rectangle(0, 0, playerSize.Width, playerSize.Height);
end
EndDirector]]--




----

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