Quantcast
Channel: Mouse-click without moving cursor? - Stack Overflow
Viewing all articles
Browse latest Browse all 10

Answer by Double-A for Mouse Click without moving Cursor [Python]

$
0
0

Thank you to those who have tried to help me out. After further research I have found a solution. I have found a way to import AutoIt into Python by using PyAutoIt. There is a ControlClick function that I have been looking for that clicks a control without moving the mouse cursor. Here is an example:

import autoit
import time

autoit.run("notepad.exe")
autoit.win_wait_active("[CLASS:Notepad]", 3)
autoit.control_send("[CLASS:Notepad]", "Edit1", "hello world{!}")
time.sleep(5)
autoit.win_close("[CLASS:Notepad]")
autoit.control_click("[Class:#32770]", "Button2")

Thanks again. This thread can be marked answered and closed :)


Viewing all articles
Browse latest Browse all 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>