Mac系统下控制鼠标移动
CGEventSourceRef source = CGEventSourceCreate(kCGEventSourceStateCombinedSessionState); CGEventRef mouse = CGEventCreateMouseEvent (NULL, kCGEventMouseMoved, CGPointMake( X, Y), 0); CGEventPost(kCGHIDEventTap, mouse); CFRelease(mouse); CFRelease(source);