Removed bots.py and slurs.py and moved them into config.py. twitch_script_class.py has been updated to handle this added a test harness for twitch_script_class.py contains_url and contains_slur are both validated refactored contains_url to use a simple(ish) regex instead of an if cascade
19 lines
397 B
Python
19 lines
397 B
Python
import pygetwindow as gw
|
|
from pynput.keyboard import Key, Controller
|
|
import time
|
|
|
|
keyboard = Controller()
|
|
|
|
|
|
def focusOBS():
|
|
gw.Win32Window.activate(gw.getWindowsWithTitle('OBS')[0])
|
|
|
|
|
|
def hotkey_trigger(key_input):
|
|
time.sleep(1)
|
|
focusOBS()
|
|
time.sleep(1)
|
|
with keyboard.pressed(Key.ctrl, Key.shift, Key.alt):
|
|
keyboard.press(key_input)
|
|
keyboard.release(key_input)
|