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.