Why PyAutoGui LocateOnScreen() only Returns None

前端 未结 11 1939
悲&欢浪女
悲&欢浪女 2020-12-15 10:39

Here\'s the code that I\'m trying to run:

import pyautogui
r=pyautogui.locateOnScreen(\'C:\\Users\\David\\Desktop\\index.png\',grayscale=False)
print r
         


        
11条回答
  •  余生分开走
    2020-12-15 11:29

    I think that the library pyautogui needs several recognition points. For example, Number seven on calculator:

    The number seven on the calculator of windows 10. In this format, I´ve got the location on the screen. Thank you for your comments

提交回复
热议问题