diff --git a/main.py b/main.py index 4f37930..f7b6c01 100644 --- a/main.py +++ b/main.py @@ -190,6 +190,7 @@ def run(self, *args): if not opts.files: played = 0 + click((1,1)) # Focus the window WITHOUT triggering the failsafe while played < opts.games or not opts.games: if played: log.info('Beginning new game...') diff --git a/sigsolve/util.py b/sigsolve/util.py index 9338875..7169984 100644 --- a/sigsolve/util.py +++ b/sigsolve/util.py @@ -111,10 +111,10 @@ def denumpify(array): def click(where, down=0.05, up=0): - x, y = where - pyautogui.mouseDown(x=x, y=y) + pyautogui.moveTo(*where) + pyautogui.mouseDown() time.sleep(down) - pyautogui.mouseUp(x=x, y=y) + pyautogui.mouseUp() time.sleep(up) @@ -141,4 +141,4 @@ def __enter__(self): self.start() def __exit__(self, exc_type, exc_val, exc_tb): - self.stop() \ No newline at end of file + self.stop()