pyautogui.locateCenterOnScreen不断返回NoneType对象

时间:2019-01-21 08:37:04

标签: python pyautogui

enter image description here

作为屏幕截图,我想按“ 1”,“ +”和“ 3”按钮,

但是pyautogui.locateCenterOnScreen不断返回NoneType错误。

我阅读了一些相关问题,

  • 当代码像上面的链接一样运行时,在屏幕上显示我的计算器
  • 使用内置函数(pyautogui.screenshot('filename.png')

    截屏后,在Paint中裁剪了按钮图像

    pyautogui.click(1472,211) x,y = pyautogui.locateCenterOnScreen('C:\\Users\\user\\Desktop\\이원복\\티몬 \\크롤링\\패캠\\11번가\\1.png') pyautogui.click(x, y) TypeError: cannot unpack non-iterable NoneType object

我使用双显示器。我所附的屏幕截图是主监视器,并在第二个监视器中打开了代码编辑器。

您能告诉我为什么它返回None吗?

0 个答案:

没有答案
相关问题