On 02/07/2013 06:22 PM, [email protected] wrote:
import objc
def clickMouse(x, y, button):
bndl = objc.loadBundle('CoreGraphics', globals(),
'/System/Library/Frameworks/ApplicationServices.framework')
objc.loadBundleFunctions(bndl, globals(), [('CGPostMouseEvent',
'v{CGPoint=ff}III')])
CGPostMouseEvent((x, y), 1, button, 1)
CGPostMouseEvent((x, y), 1, button, 0)
clickMouse(600,500, 1)
this seems to send the mouse cursos to the top left corner, no matter what
coords i send on clickMouse...
Also, I just can't seem to install PyObjc and use it on Python3.3 ... always
get No module named objc.
Sighs... Made a simple python app while at work (windows 7) and was trying to
change it to work on Os X (home computer) but cant even get the basics done
(move and click mouse)....
Thank you.
What's the objc module got to do with the mouse?
http://packages.python.org/pyobjc/api/module-objc.html
Perhaps you meant some other module. Could you be specific? What
modules did you import, what other code did you write, what version of
Python are you running, and on which computer OS did you get the results
you describe?
--
DaveA
--
http://mail.python.org/mailman/listinfo/python-list