Setting MouseCursor

  • Hi,

    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 because moving windows is just shown at the
    end of the moving action, instead of the normal behaviour that the window
    moves with the mouse.

    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 ?

    Thanks in advance
  • 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
previous month december 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Go to today