This commit is contained in:
Mylloon 2023-09-24 01:29:33 +02:00
parent 6c94de6ff7
commit 9b494cc014
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

12
main.py
View file

@ -6,6 +6,7 @@ from PIL import ImageGrab
from pyautogui import click, moveTo
if __name__ == "__main__":
print("Running...")
while True:
# Screenshot
screenshot = ImageGrab.grab()
@ -21,11 +22,14 @@ if __name__ == "__main__":
locations = where(result >= threshold)
# Fetch coordinates
locations = list(zip(*locations[::-1]))[0]
locations = list(zip(*locations[::-1]))
# Move and click
moveTo(locations[0], locations[1])
click()
# If we find a burger
if len(locations):
coordinates = locations[0]
# Move and click
moveTo(coordinates[0], coordinates[1])
click()
# Wait a second every loop
sleep(1)