X gurus?

Gerrit Holl gerrit at nl.linux.org
Wed Mar 1 04:23:39 EST 2000


Mike Sabin wrote:
> I am beginning a small project which I am afraid may
> have to end up being written in C (I say afraid,
> because I will have to LEARN C first, if this is the
> case).  I am programming for the X Windows environment
> on Linux, and need to accomplish the following two
> things:
>
> 1. At a certain time, I need to get the x-y coordinates
> of my mouse pointer, no matter where my pointer is at
> the time (it could be over the window for some other
> application, but I want a function call to return
> the coordinates to my application)
>
> 2. At a certain time, I need to artificially generate
> a button 1 mouse click, whereever the mouse pointer is
> currently located (e.g. over another application's
> window).  My program must do this, without me actually
> having to click on the mouse or hit any key.
>
> Can it be done in python?  I actually don't have much
> hope that it can, but I am often surprised what some
> of you people will come up with around here....

Sjoerd Mullender <Sjoerd.Mullender at cwi.nl> has done that.
Parnassus links to his homepage <http://www.cwi.nl/~sjoerd/>
for an extensive X library in Python, but it's not on his
homepage. It can still be downloaded, however, on:

http://www.cwi.nl/ftp/sjoerd/X-extension.tar.gz
</quote>

have fun,
Gerrit.

-- 
-----BEGIN GEEK CODE BLOCK----- http://www.geekcode.com
Version: 3.12
GCS dpu s-:-- a14 C++++>$ UL++ P--- L+++ E--- W++ N o? K? w--- !O !M !V PS+ PE?
Y? PGP-- t- 5? X? R- tv- b+(++) DI D+ G++ !e !r !y
-----END GEEK CODE BLOCK-----




More information about the Python-list mailing list