【发布时间】:2018-08-24 17:54:28
【问题描述】:
我的 pyautogui 总是不返回任何图像。图像与程序位于同一文件夹中。图像名称与我保存的相同。这些图像是最新的,并且肯定在我的屏幕上。请帮忙,pyautogui 总是为 locateOnScreen 返回 none。这是我的代码:
import time
import sys
import pyautogui
pyautogui.FAILSAFE = True
pyautogui.PAUSE = 1
pyautogui.size()
width, height = pyautogui.size()
y = pyautogui.locateOnScreen('LOLicon.png')
print(y)
for i in range(2):
x = pyautogui.moveTo(y)
pyautogui.click(x)
time.sleep(2)
pyautogui.doubleClick()
del x
del y
【问题讨论】: