Control the mouse click the small program of Python

1 from ctypes import *
2 import pyautogui
3 import time
4 time.sleep(5)
5 while 1:
6     pyautogui.click(400, 400, clicks=1, interval=0.0, button='left')
7     time.sleep(10)

Note:

  Coordinates (400, 400) is the top left corner of the computer screen as the origin;  

  Because this program is an infinite loop, in PyCharm press "Ctrl + F2" to interrupt the program.

Guess you like

Origin www.cnblogs.com/HuangYJ/p/11618267.html