Simulating mouse input programmatically in OS X
Yes, it is possible. You can use the Quartz Event Services to simulate input events. Assuming C, I wrote this quick example: #include <ApplicationServices/ApplicationServices.h> #include <unistd.h> int main() { // Move to 200×200 CGEventRef move1 = CGEventCreateMouseEvent( NULL, kCGEventMouseMoved, CGPointMake(200, 200), kCGMouseButtonLeft // ignored ); // Move to 250×250 CGEventRef move2 = CGEventCreateMouseEvent( NULL, kCGEventMouseMoved, … Read more