from pyautogui import * import pyautogui import time import keyboard import random import win32api, win32con import time from PIL import Image, ImageDraw import aoe_commands def wait_for_start(): start_started = False while 1: if pyautogui.locateOnScreen('images/startscreen.png', confidence=0.9) != None: print("Startscreen found") start_started = True time.sleep(0.5) elif start_started: print("Proceeding") return else: print("Startscreen not found") time.sleep(0.5) def collect_screenshots(): cnt = 0 while True: #keyboard.is_pressed('q') == False: time.sleep(10) pic = pyautogui.screenshot() pic.save(f"image_{cnt}.png") cnt += 1 def initial_scout_trace(): aoe_commands.select_town_center() # TODO