Control mouse with Python?

S

simo

I'm looking to make an app to record my mouse movements and play them
back.

It will essentially be for unit testing websites, so I suppose it
could be done using one of the wxPython MSIE ActiveX widgets, but I'd
like it to work on other platforms and not just in web browsers.

Anyone got any ideas for how this could be done?

I guess if reading/writing mouse movements is difficult, I could limit
it to clicking buttons or use a fixed screen resolution and absolute
screen coordinates, but that will be very limiting I think.
 
C

Cameron Laird

I'm looking to make an app to record my mouse movements and play them
back.

It will essentially be for unit testing websites, so I suppose it
could be done using one of the wxPython MSIE ActiveX widgets, but I'd
like it to work on other platforms and not just in web browsers.

Anyone got any ideas for how this could be done?

I guess if reading/writing mouse movements is difficult, I could limit
it to clicking buttons or use a fixed screen resolution and absolute
screen coordinates, but that will be very limiting I think.

Common operating systems aren't friendly to this effort.
At the least, you'll need to define your goal quite pre-
cisely. Do you want to construct a Python program that
monitors the mouse movement while *other* processes are
active? That's deeply non-portable. If it's Windows that
motivates you, <URL: http://wiki.tcl.tk/8813 > has refer-
ences that'll help you start on the subject of
record/playback utilities.
 
D

Dennis Lee Bieber

I'm looking to make an app to record my mouse movements and play them
back.
Ack! I've not seen one of those since my early Amiga days, where
one plugged into the event stream (mouse, keyboard, floppy eject/insert,
etc.) and treated everything as a passthrough. Also how one "played
back" -- by injecting formatted events into the stream. Had a scriptable
event program -- came in useful for revealing the easter eggs in the OS
(considering one of them involved something like holding down both
left/right shift, left/right Amiga keys, left mouse button, AND
eject/insert a disk in DF0:)

--
 
S

simo

Daniel Dittmar said:
Pythons tend to eat mice so they don't make good mice shepherds.

Very good.

I've done some research and it looks like Jython may be a better bet....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top