赞
踩
import pyautogui
import time
from PIL import Image
#pyautogui.FAILSAFE = False #左上角
#pyautogui.PAUSE = 2.5
screenWidth, screenHeight = pyautogui.size() # 返回屏幕分辨率
print(pyautogui.size())
currentMouseX, currentMouseY = pyautogui.position() # 返回鼠标的所在位置
print(pyautogui.position())
pyautogui.screenshot('d:\\foo.png')
# 返回(最左x坐标,最顶y坐标,宽度,高度)
findd=pyautogui.locateOnScreen('d:\\wx1.png')
print(findd)
pyautogui.moveTo(findd[0], findd[1]) #移动鼠标到指定位置
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。