X gurus?

Mike Sabin msabin at cdc.net
Wed Mar 1 04:59:20 CET 2000


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....

Mike Sabin



More information about the Python-list mailing list