i want to locateonscreen an image with specific region, but it shows ValueError('needle dimension(s) exceed the haystack image or region dimensions')
There is my code:
while True:
try:
ikankanan = pyautogui.locateOnScreen('ikankanan.png', region = (389,169,583,45), grayscale = True, confidence = 0.6)
tanda = pyautogui.locateOnScreen('tandafull.png',region = (389,169,583,45), grayscale = True, confidence = 0.6)
except TypeError:
pass
except AttributeError:
pass