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
I got this working by using the following:
r = None while r is None: r = pyautogui.locateOnScreen('rbin.PNG', grayscale = True) print icon_to_click + ' now loaded'
The key is to make grayscale = True.