Consegui fazer reconhecer a posição da imagem com o código abaixo, está encontrando perfeitamente, porém, só não clica kkkk.
Conseguem ajudar?
from pyautogui import moveTo, click, press
import pyautogui
import time
import win32api,win32con
def click(x,y):
win32api.SetCursorPos((x,y))
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,0,0)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,0,0)
while True:
sc = pyautogui.screenshot(region=(1118, 25, 800, 615))
width,height = sc.size
for x in range(0,width,10):
achou = 0
for y in range(0,height,10):
r,g,b = sc.getpixel((x,y))
print(r,g,b)
if r == 255 and g == 255 and b == 0:
achou = 1
print('tentando clicar')
press('F4')
click(1118+x,25+y)
time.sleep(0.5)
break
if achou ==1:
break