By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,824 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,824 IT Pros & Developers. It's quick & easy.

Control mouse with Python?

P: n/a
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.
Jul 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Pythons tend to eat mice so they don't make good mice shepherds.
Jul 18 '05 #2

P: n/a
In article <30**************************@posting.google.com >,
simo <si************@yahoo.co.uk> wrote:
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.
--

Cameron Laird <cl****@phaseit.net>
Business: http://www.Phaseit.net
Jul 18 '05 #3

P: n/a
On 30 Jun 2004 22:25:56 -0700, si************@yahoo.co.uk (simo)
declaimed the following in comp.lang.python:
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:)

-- ================================================== ============ <
wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
================================================== ============ <
Home Page: <http://www.dm.net/~wulfraed/> <
Overflow Page: <http://wlfraed.home.netcom.com/> <

Jul 18 '05 #4

P: n/a
"Daniel Dittmar" <da************@sap.com> wrote:
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....
Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.