From 3ae283d975a10e140b977f0577ac559e5639a997 Mon Sep 17 00:00:00 2001 From: Matthew Stream-PC Date: Tue, 20 Dec 2022 15:09:23 -0500 Subject: [PATCH] implemeneted OBS error clipping for debug --- pyclashbot/bot/states.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pyclashbot/bot/states.py b/pyclashbot/bot/states.py index bdf3bc944..808b338a3 100644 --- a/pyclashbot/bot/states.py +++ b/pyclashbot/bot/states.py @@ -84,6 +84,7 @@ def state_tree( # DEBUG::: wait forever instead of restarting # while True:time.sleep(1000) + clip_that() # run restart state state = state_restart(logger) @@ -399,9 +400,25 @@ def state_war(logger) -> Literal["restart", "account_switching"]: +#FOR OBS RECORDING OF ERRORS +def clip_that(): + import pyautogui + #press key combination + pyautogui.keyDown("ctrl") + pyautogui.keyDown("shift") + time.sleep(0.33) + pyautogui.keyDown("r") + time.sleep(0.33) + #unpress + pyautogui.keyUp("r") + pyautogui.keyUp("ctrl") + pyautogui.keyUp("shift") + + print("Clipped this error!") +