Proper classes

This commit is contained in:
2020-11-08 15:37:01 +01:00
parent de91c6a9cc
commit 5b742c9b5d
7 changed files with 163 additions and 8 deletions

11
test.py
View File

@@ -7,7 +7,7 @@ import win32api, win32con
import time
from PIL import Image, ImageDraw
WAIT4CLICK = 0.04
# see https://github.com/KianBrose/Image-Recognition-Botting-Tutorial/blob/master/README.txt
#def click(x,y):
@@ -62,6 +62,7 @@ def wait_for_start():
def zoomout():
"Tut nicht"
time.sleep(0.5)
print("Zooming out")
pyautogui.click(x=500, y=500)
@@ -81,13 +82,7 @@ def find_peasants():
print(f"Für Bild {img_path} wurden {len(matches)} matches gefunden: {matches}")
return all_matches
def order_peasants(number):
print(f"Trying to order {number} peasants.")
pyautogui.press('h')
time.sleep(WAIT4CLICK)
for i in range(number):
pyautogui.press('q')
time.sleep(WAIT4CLICK)
def assign_hotkeys():
pyautogui.press(',')