[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Using mouse

Lucas Prado Melo

12/31/2007 2:21:00 PM

I would like to control mouse events (i.e. I would like to "click" and
move mouse around by code).
How do I do this in python?

regards
3 Answers

Grant Edwards

1/1/2008 2:55:00 PM

0

On 2007-12-31, Lucas Prado Melo <lukepadawan@gmail.com> wrote:

> I would like to control mouse events (i.e. I would like to
> "click" and move mouse around by code). How do I do this in
> python?

http://python-xlib.sourceforge.net/doc/html/python-xl...

--
Grant Edwards grante Yow! Pardon me, but do you
at know what it means to be
visi.com TRULY ONE with your BOOTH!

Gabriel Genellina

1/1/2008 5:51:00 PM

0

En Tue, 01 Jan 2008 12:54:54 -0200, Grant Edwards <grante@visi.com>
escribi�:

> On 2007-12-31, Lucas Prado Melo <lukepadawan@gmail.com> wrote:
>
>> I would like to control mouse events (i.e. I would like to
>> "click" and move mouse around by code). How do I do this in
>> python?
>
> http://python-xlib.sourceforge.net/doc/html/python-xl...

On Windows, use the mouse_event function
http://msdn2.microsoft.com/en-us/library/ms6...
Available on pywin32 https://sourceforge.net/project... or using
ctypes directly.

--
Gabriel Genellina

Scott David Daniels

1/1/2008 6:17:00 PM

0

Lucas Prado Melo wrote:
> I would like to control mouse events (i.e. I would like to "click" and
> move mouse around by code).
> How do I do this in python?

A python doesn't have a mouse for long; it eats them up.

It is your display and user I/O system that deals with mice,
and so, inevitably, the answer to your question (and, indeed
whether such a thing is even possible) depends on the OS and
display packages you are using.

--Scott David Daniels
Scott.Daniels@Acm.Org