diff --git a/projects/panic/cards/lower_sound.py b/projects/panic/cards/lower_volume.py similarity index 100% rename from projects/panic/cards/lower_sound.py rename to projects/panic/cards/lower_volume.py diff --git a/projects/panic/cards/mute_sound.py b/projects/panic/cards/mute_sound.py new file mode 100644 index 00000000..d820d0a1 --- /dev/null +++ b/projects/panic/cards/mute_sound.py @@ -0,0 +1,21 @@ +# pip install pywin32 +import win32api +import win32gui +import time +import random + +WM_APPCOMMAND = 0x319 +APPCOMMAND_VOLUME_MUTE = 0x80000 + +def mute_sound(): + win32api.SendMessage( + win32gui.GetForegroundWindow(), + WM_APPCOMMAND, + 0, + APPCOMMAND_VOLUME_MUTE + ) + +# mute every 5 minutes +while True: + mute_sound() + time.sleep(300)