Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.040 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'skip:[ 20': 0.03; 'mouse': 0.07; 'python': 0.09; 'subject:Python3': 0.09; 'def': 0.10; '(windows': 0.16; 'globals(),': 0.16; 'url:packages': 0.16; 'write,': 0.16; 'wrote:': 0.17; 'app': 0.19; 'module': 0.19; 'trying': 0.21; 'import': 0.21; 'meant': 0.21; 'button,': 0.22; 'seems': 0.23; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'module.': 0.27; "skip:' 50": 0.29; 'install': 0.29; 'code': 0.31; 'url:python': 0.32; "skip:' 20": 0.32; 'could': 0.32; 'to:addr:python-list': 0.33; 'version': 0.34; "can't": 0.34; 'done': 0.34; 'pm,': 0.35; 'but': 0.36; 'url:org': 0.36; 'modules': 0.36; 'thank': 0.36; 'subject:: ': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'you.': 0.61; 'matter': 0.61; 'subject:, ': 0.61; 'email addr:gmail.com': 0.63; 'results': 0.65; 'received:74.208': 0.71; 'click': 0.76; 'received:74.208.4.194': 0.84; 'running,': 0.84; 'subject:Moving': 0.84; 'url:api': 0.84; 'cursos': 0.91 Date: Thu, 07 Feb 2013 21:08:51 -0500 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Moving mouse, Python3 and PyObjc References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:8xmN+ZO/hMtGlSrDRFcMpb0HEnOTbRH7XaHAzn63IVa jnMc1VqQXHvtpD7MMNKV7+dsehpVj+9PCDcOjMoU2bXRAte1d2 EcGOvtEUPjgeDnOZIr0GVkPr6HB7r9/Go7ZMycpyoK2z/qWAcD Bc70xA8rj4t33RP/pi7RlPlwN8yQ8TrR70lIPOhjWJj71Zp0CT CgDWkqUqztdcjcEj/JL2OCj5JGon1puqSY1L9sP2OeTSIlivoA UYJI+p7V7b426I4wCJ+CTEbkoGmU5+4h9uMy4HzQfVWY66ph8y Zke2I+4JxlHbeRJFbCJtgRERh5iZSi/yMzabcVe1RP0VHz4Vg= = X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1360289355 news.xs4all.nl 6940 [2001:888:2000:d::a6]:52311 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:38394 On 02/07/2013 06:22 PM, joaofguiomar@gmail.com 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