import pyautogui
import time
# print(pyautogui.position())
i = 0
while True:
time.sleep(5)
pyautogui.keyDown('space')
time.sleep(1.85)
pyautogui.keyUp('space')
time.sleep(3)
x = 0
while x != 40:
pyautogui.keyDown('space')
time.sleep(1)
pyautogui.keyUp('space')
x += 1
continue
pyautogui.keyDown('space')
time.sleep(15)
pyautogui.keyUp('space')
print(i)
i += 1
if pyautogui.locateOnScreen('qwe.PNG') == None:
continue
else:
pyautogui.click(x=168, y=674)
pyautogui.click(pyautogui.locateCenterOnScreen('qwe.PNG')) # вот эта команда ищет заданный рисунок
print('Опа Рыбка')
continue