Control mouse with Python?

Cameron Laird claird at
Thu Jul 1 13:59:10 CEST 2004

In article <30260531.0406302125.7083d33f at>,
simo <simoninusa2001 at> wrote:
>I'm looking to make an app to record my mouse movements and play them
>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: > has refer-
ences that'll help you start on the subject of
record/playback utilities.

Cameron Laird <claird at>

More information about the Python-list mailing list