Cursor Position.

Diez B. Roggisch deets at nospam.web.de
Wed Nov 9 16:42:01 EST 2005


> That is my exact problem. I want to have the mouse event captured from 
> another application window. In this case an image window opened in Paint 
> Shop Pro that by the way uses Python to make scripts. I would like to be 
> able to click on the image and get the X,Y positions. I have been able to 
> get the X,Y from Tkinter own window as you say. Once I have those positions 
> I can use them in a Paint Shop Pro script.
> Thanks for your reply. Do you have any advise as to how I can do what I am 
> trying or is it, in a practical matter, impossible.

As I said - it certainly is doable. But I fear not in tkinter "as is" 
(you can use tk still for your _own_ gui), and not without deeper 
knowledge of the windows event system. Then mark hammond's win32 
extensions are a starting point. And you should search for example code 
on MSDN or something like that (obviously _not_ in python), to get a 
starting point.

Regards,

Diez



More information about the Python-list mailing list