473,804 Members | 3,091 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3097
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.pytho n:
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.netc om.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
=============== =============== =============== =============== == <
Home Page: <http://www.dm.net/~wulfraed/> <
Overflow Page: <http://wlfraed.home.ne tcom.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
15132
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 help?
5
2616
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
10685
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 userControl, I can detect the movement using MouseMove event. the problem is when the mouse is on the child control : I can t detect
15
10949
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 great. But I now want to show a different tooltip for every day. For now I found out that I can add a tooltip for the entire custom control
8
2787
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) Debug.WriteLine(Me.Bounds.Contains(e.X, e.Y)) End Sub
6
3166
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 works fine, it seems to fire when the form changes visibility. Here is the code. Private Sub lblP1JoyUp_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles lblP1JoyUp.Paint If lblP1JoyUp.Visible = True Then Dim...
1
2298
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 message but this only goes to the form and I want it in the user control that maybe very much removed from the form's knowledge; i.e. the form may launch a 3rd party form that, upon a call back, decides to launch other form that has my user control...
1
2094
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 at that. Is there anyway to do what the link says in Python? If you follow the link above, it talks about 'sending the byte array to 0x10 (16)'. I'm not sure if that is possible in python. Can anyone help or point me in the right direction? ...
4
4308
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 have is that sometimes I seem to loose the original "holder" of focus and when the user hits tab while using "temporary" focus(while the mouse is over a control) it will change focus to the next control but not update it. So I have several issues....
0
9704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9569
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10318
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9130
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6844
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.