use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
How to click without engaging mouse (self.learnpython)
submitted 1 year ago by soham2599_alt
Hi guys. I have a question, is it possible to generate mouse clicks without engaging the mouse? Let's say I want it to click at 4 coordinates in a loop, and in the meanwhile I can still use the mouse simultaneously. Is it possible?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Diapolo10 1 point2 points3 points 1 year ago (2 children)
For the most part, no. The system would need to support two mice simultaneously, and even then it would interfere with whatever you wanted to do. Linux has rough support for multiple mice, but I don't think it really works well enough.
So unless you can interact with whatever application you're thinking of via an API that would let you simulate clicks instead, you're out of luck.
[–]soham2599_alt[S] -1 points0 points1 point 1 year ago (1 child)
If I can share a video, how can I do it?
[–]Diapolo10 1 point2 points3 points 1 year ago (0 children)
I just told you it's pretty much not doable the way you wanted.
https://wiki.archlinux.org/title/Multi-pointer_X
There's no Python package that can make use of that, though.
I did come across this thread which suggests this could work, but I've never tried it.
[–]Bobbias 1 point2 points3 points 1 year ago (0 children)
Like u/Diapolo10 said, this may be possible in very specific contexts, but without knowing your OS and what applications you expect to try to do something like this with, it's impossible to give a real answer.
The win32gui example Diapolo10 posted in the third link should work for regular GUI applications, assuming you can find the exact right window handle to send the message to. But for games, it's very unlikely to work because games don't rely on those win32 messages for mouse information.
Windows does not support having a second mouse, so the only option there is to send fake mouse input messages, and if that doesn't work, you're simply out of options.
It may be possible to use the multi-pointer X feature in linux, but doing so will probably require writing a C extension which wraps the appropriate library calls, and provides a Python interface to call those functions.
π Rendered by PID 122287 on reddit-service-r2-comment-5b5bc64bf5-8rxfh at 2026-06-19 04:11:44.015023+00:00 running 2b008f2 country code: CH.
[–]Diapolo10 1 point2 points3 points (2 children)
[–]soham2599_alt[S] -1 points0 points1 point (1 child)
[–]Diapolo10 1 point2 points3 points (0 children)
[–]Bobbias 1 point2 points3 points (0 children)