1.在Win10中任意窗口按下"Win+Shift+S"组合键进入截屏模式 ,截图并保存为 n.png
2.代码:
#encoding=utf-8 import pyautogui from PIL import Image import time time.sleep(3) left, top, width, height = pyautogui.locateOnScreen(r"n.png") center = pyautogui.center((left, top, width, height)) pyautogui.click(center)
标签:pyautogui,center,top,height,查找,locateOnScreen,import From: https://www.cnblogs.com/pu369/p/17204125.html