python实现隔段时间点击一下电脑屏幕的某块区域
时间:2020-07-12 11:58:43
收藏:0
阅读:98
import time
import pyautogui
x, y = 302, 534 # 鼠标需要移动到的位置
num_seconds = 2 # 将鼠标移动到指定坐标的间隔时间
time.sleep(8) # 延迟8秒
pyautogui.moveTo(x, y, duration=num_seconds)
time.sleep(3) # 延迟3秒
i = 0
while True:
time.sleep(2)
pyautogui.click()
i += 1
print(i)
评论(0)