473,382 Members | 1,423 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Control mouse with Python?

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
4 3071
Pythons tend to eat mice so they don't make good mice shepherds.
Jul 18 '05 #2
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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ken Favrow | last post by:
Is there a way I can control the mouse with python? I need to be able to navigate and click in other applications based on vectors sent from my program. Basically a mouse macro type thing. any...
5
by: oglycans | last post by:
Hi. Anybody know a way to control the mouse pointer (move it around and click on things) using python? Thanks.
3
by: red | last post by:
mouse events when the mouse is on a "child control" hi everyone; my problem: I have a userControl in this usercontrol, I have a child control (a button) when the mouse moves over the...
15
by: Tinus | last post by:
Hello all, I've created a custom control that draws a monthly schedule (using the Draw function in C#). Basically it draws 31 boxes and writes the day number in every box. This works...
8
by: Tom | last post by:
Hi I am having problems working out if the mouse pointer is within the control bounds within the OnMouseMove method: Protected Overrides Sub OnMouseMove(ByVal e As MouseEventArgs) ...
6
by: jcrouse | last post by:
I am rotating some text is some label controls. In the one place I use it it works fine. In the other place I use it I can't figure out the syntax. I don't really understand the event. Where it...
1
by: Israel | last post by:
The problem: I want to know, definitively when a slider loses focus after a user has started sliding and hasn't released the mouse yet. It appears that this is captured with the WM_ACTIVATEAPP...
1
by: semagraw | last post by:
I found this link that describes the byte arrays to control the IM/Email Leds on my Logitech MX610 mouse: http://www.kdedevelopers.org/node/2029 The link to the tarball is dead so I can't look...
4
by: Jon Slaughter | last post by:
I've created some custom controls and forms that allow the feature to temporarily transfer focus to a control that has been entered by the mouse. Everything seems to work fine but the problem I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.