Setting MouseCursor
Marc Epard
mepard at mac.com
Sun Dec 23 15:24:18 PST 2007
On Dec 23, 2007, at 4:29 PM, Julius Eckert wrote:
> i am doing a code to control the mouse by the iSight cam.
> Currently I am using CGWarpMouseCursorPosition(CGPoint) function to
> set the
> position of the mouse.
> But this method is a bit buggy....
>
> What is the correct way to do this (there must be a better way because
> iChat's - Screensharing - Tool can control the mouse perfectly).
> I also want to emulate clicks and scrolling actions of the mouse.
> How can I do that ?
If you can require Tiger or newer, take a look at CGEvent.h. Pre-
Tiger, use CGPostMouseEvent to move the mouse as well as post clicks.
-Marc
More information about the MacOSX-dev
mailing list