Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- delay 3
- repeat 5 times
- tell application "System Events" to key code 31 using control down
- end repeat
- delay 3
- set x to 529
- set y to 563
- do shell script "
- /usr/bin/python <<END
- import sys
- import time
- from Quartz.CoreGraphics import *
- def mouseEvent(type, posx, posy):
- theEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonLeft)
- CGEventPost(kCGHIDEventTap, theEvent)
- def mousemove(posx,posy):
- mouseEvent(kCGEventMouseMoved, posx,posy);
- def mouseclick(posx,posy):
- mouseEvent(kCGEventLeftMouseDown, posx,posy);
- mouseEvent(kCGEventLeftMouseUp, posx,posy);
- ourEvent = CGEventCreate(None);
- currentpos=CGEventGetLocation(ourEvent); # Save current mouse position
- mouseclick(" & x & "," & y & ");
- mousemove(int(currentpos.x),int(currentpos.y)); # Restore mouse position
- END"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement