@@ -0,0 +1,2477 @@
+#! /usr/local/bin/python%0A%0A# compile with python2.6 ./test.py 666 66 0%0Aimport objc%0Aimport sys%0Atry:%0A        x=int(sys.argv%5B1%5D)%0A        y=int(sys.argv%5B2%5D)%0A        try:%0A                delay=int(sys.argv%5B3%5D)%0A        except:%0A                delay=0%0Aexcept:%0A        print %22USAGE mouseclick %5Bint x%5D %5Bint y%5D %5Boptional delay in seconds%5D%22%0A        exit()%0Aprint %22mouse click at %22, x, %22,%22, y,%22 in %22, delay, %22seconds%22%0Aimport time%0Afrom Quartz.CoreGraphics import CGEventCreateMouseEvent%0Afrom Quartz.CoreGraphics import CGEventPost%0Afrom Quartz.CoreGraphics import kCGEventMouseMoved%0Afrom Quartz.CoreGraphics import kCGEventLeftMouseDown%0Afrom Quartz.CoreGraphics import kCGEventLeftMouseDown%0Afrom Quartz.CoreGraphics import kCGEventLeftMouseDragged%0Afrom Quartz.CoreGraphics import kCGEventLeftMouseUp%0Afrom Quartz.CoreGraphics import kCGMouseButtonLeft%0Afrom Quartz.CoreGraphics import kCGHIDEventTap%0Afrom Quartz.CoreGraphics import kCGEventKeyDown%0Afrom Quartz.CoreGraphics import kCGEventTabletPointer%0Afrom Quartz.CoreGraphics import kCGEventTabletProximity%0Afrom Quartz.CoreGraphics import CGEventSetIntegerValueField%0Afrom Quartz.CoreGraphics import kCGMouseEventClickState%0Afrom Quartz.CoreGraphics import CGEventSetType%0Adef mouseEvent(type, posx, posy):%0A        theEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonLeft)%0A        CGEventPost(kCGHIDEventTap, theEvent)%0Adef mousemove(posx,posy):%0A%09%09mouseEvent(kCGEventMouseMoved, posx,posy);%0A%09%09#mouseEvent(kCGEventTabletProximity, posx,posy);%0A%09%09#mouseEvent(kCGEventLeftMouseDown, posx,posy);%0A%09%09#mouseEvent(kCGEventLeftMouseUp, posx,posy);%0Adef mouseclick(posx,posy):%0A        mouseEvent(kCGEventLeftMouseDown, posx,posy);%0A        mouseEvent(kCGEventLeftMouseUp, posx,posy);%0A%0A%0Adef doubleClick(posx, posy, clickCount):%0A%09%09theEvent = CGEventCreateMouseEvent(None, kCGEventLeftMouseDown, (posx,posy), kCGMouseButtonLeft); %0A%09%09CGEventSetIntegerValueField(theEvent, kCGMouseEventClickState, clickCount);  %0A%09%09CGEventPost(kCGHIDEventTap, theEvent);%0A%09%09CGEventSetType(theEvent, kCGEventLeftMouseUp);  %0A%09%09CGEventPost(kCGHIDEventTap, theEvent);  %0A%09%09CGEventSetType(theEvent, kCGEventLeftMouseDown);  %0A%09%09CGEventPost(kCGHIDEventTap, theEvent);  %0A%09%09CGEventSetType(theEvent, kCGEventLeftMouseUp); %0A%09%09CGEventPost(kCGHIDEventTap, theEvent); %0A%09%09%0A%0A%0A        %0Atime.sleep(delay);%0Amousemove(x,y);%0AdoubleClick(x,y,1);%0AdoubleClick(x,y,1);%0A#mouseclick(x,y);%0A#mousemove(730,267);%0A#doubleClick(730,267,2);%0A#time.sleep(0.01);%0A#mouseclick(268,332);%0Aprint %22done.%22%0A

Create move.py