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

Home Posts Topics Members FAQ

Using mouse

I would like to control mouse events (i.e. I would like to "click" and
move mouse around by code).
How do I do this in python?

regards
Jan 1 '08 #1
3 2155
On 2007-12-31, Lucas Prado Melo <lu*********@gm ail.comwrote:
I would like to control mouse events (i.e. I would like to
"click" and move mouse around by code). How do I do this in
python?
http://python-xlib.sourceforge.net/d...n-xlib_14.html

--
Grant Edwards grante Yow! Pardon me, but do you
at know what it means to be
visi.com TRULY ONE with your BOOTH!
Jan 1 '08 #2
En Tue, 01 Jan 2008 12:54:54 -0200, Grant Edwards <gr****@visi.co m>
escribi�:
On 2007-12-31, Lucas Prado Melo <lu*********@gm ail.comwrote:
>I would like to control mouse events (i.e. I would like to
"click" and move mouse around by code). How do I do this in
python?

http://python-xlib.sourceforge.net/d...n-xlib_14.html
On Windows, use the mouse_event function
http://msdn2.microsoft.com/en-us/library/ms646260.aspx
Available on pywin32 https://sourceforge.net/projects/pywin32/ or using
ctypes directly.

--
Gabriel Genellina

Jan 1 '08 #3
Lucas Prado Melo wrote:
I would like to control mouse events (i.e. I would like to "click" and
move mouse around by code).
How do I do this in python?
A python doesn't have a mouse for long; it eats them up.

It is your display and user I/O system that deals with mice,
and so, inevitably, the answer to your question (and, indeed
whether such a thing is even possible) depends on the OS and
display packages you are using.

--Scott David Daniels
Sc***********@A cm.Org
Jan 1 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2760
by: me | last post by:
I have been looking online for a year, and cant find one. I used to use the int86() command in dos command-line mode, but it can't work in linux. I am using Allegro to make my program work, but I need to put it on a floppy, both the kernal and the program. Allegro only works in X-windows, and is commericial anyway. I have tried to figure it out from allegros code, but its too spread out for me to get it all. I just need a small program...
10
7660
by: Ryan McGeary | last post by:
In a <select> drop-down, the onchange event isn't called when scrolling through the dropdown using the mouse-wheel and when crossing over a new <optgroup>. Using the example below, notice how the onchange event isn't called when mouse wheel scrolling between A3 and B1, but it works properly when scrolling between A1 and A2. E.g. ------------------------------------------
3
3610
by: mitsura | last post by:
Hi, I have included a small listing. The test program opens a panel and show a bitmap. What I want is to when the mouse is over the bitmap panel, I want to trap the left mouse click. The purpose is to get the position of the mouse pointer on the bitmap. However, for some reason, the left (I also tried right) mouse clicks are not intercepted. I new to Python and wxWindows so any help would be greatly appreciated.
2
6470
by: meganrobertson22 | last post by:
Hi- I'd like to try to have text displayed when I move my mouse over a command button. For example: let's say I have a form with 3 different command buttons. Each command button launches a different report. For example:
1
1573
by: Salad | last post by:
I bought a MS Standard Wireless Optical Mouse, ver 3.0 today and I have a question about it. The question is...do you leave the batteries in until they die? Does the red light stay on until the batteries die or is there a way to turn the mouse off. There is a paragragh in the product manual that states: "Storing the Receiver in the Mouse. For added portability or when the mouse is not in use, you can snap the receiver into its slot on...
6
3166
by: Brian Basquille | last post by:
Hello all. Due to the short time remaining to my project handup for my Air Hockey game, i've abandoned the idea of implementing it over a network. But since the only real way to play Air Hockey is using a mouse, i was wondering if it is possible for 2 people to use 2 mouses while on the same computer? For example, 1 mouse could be in USB port and other in PS/2 port. Does C Sharp support this? And if so, can anyone point me to some...
31
2252
by: arun | last post by:
suppose i have a pointer to an array of integers.can i initialize each member of the array using pointers?plz explain
0
43852
missinglinq
by: missinglinq | last post by:
Having been asked, for the umpteenth time, how to use the MouseMove property to change the appearance of an object, I put together this short tutorial and sample database today. Perhaps it will be of use to some of you. The MouseMove Event is used to trigger an action when the user moves the mouse cursor over an object such as a textbox, label or command button. This can be applied to a number of routines. The attached zip file,...
8
4736
by: Scott M. | last post by:
I've tried following the simple instructions to be able to use MyServices within C#...Add a project reference to Microsoft.VisualBasic.dll and add: "using Microsoft.VisualBasic.MyServices;" to the code module. After that, I expected to be able to use MyClock or MyComputerInfo, but none of the "My" stuff appears in the intellisense. I've tried rebuilding (after adding the reference and the using statement) and still no luck. What am I...
2
2656
by: AndrewC | last post by:
I am using the Scriptaculous/Prototype libraries to build a project and I really want to have an effect like the mootools download page (http://www.mootools.net/download) where when you mouse over the lines at the bottom very fast, the lines do not highlight. They only highlight if your mouse is over them for slightly longer. Sadly, I can't use the mootools library, so I am hoping someone can point me in the right direction. I am...
0
9577
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
10569
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10325
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...
1
10315
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9140
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
7615
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
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.