diff --git a/main.py b/main.py index ba9eccf..f3b3cbe 100644 --- a/main.py +++ b/main.py @@ -1,13 +1,15 @@ -import pyautogui import os -if os.name == 'windows': +import pyautogui + +if os.name == "windows": import d3dshot + class AutomatableGame: def __init__(self): self.loc = pyautogui.locateOnScreen("images/app.png") - + def fetch_sshot(self): return pyautogui.screenshot(region=self.loc) @@ -19,6 +21,6 @@ class AutomatableGame__Windows(AutomatableGame): def __init__(self): super().__init__(self) self.d = d3dshot.create() - + def fetch_sshot(self): - return d.screenshot() # Cut this to self.loc(x, y, w, h) + return d.screenshot() # Cut this to self.loc(x, y, w, h)