MouseEvent(kCGEventRightMouseUp, int(position.x), int(position.y)) MouseEvent(kCGEventRightMouseDown, int(position.x), int(position.y)) TheEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonRight) Paste the following code into the Run Shell Script action: from Quartz.CoreGraphics import CGEventCreateMouseEvent, kCGMouseButtonRight, CGEventPost, kCGHIDEventTap, CGEventCreate, kCGEventRightMouseDown, kCGEventRightMouseUp, CGEventGetLocation Search for "shell" and drag the "Run Shell Script" action to the storyboard: It's a bit slower than a real mouse (~0.5 second delay), but it works and requires no third-party software.Ĭhoose Service receives no input in any application. Here's a solution using Automator and Python.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |