Skip to content

Commit

Permalink
mute
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdoe committed Oct 5, 2023
1 parent f5d5859 commit d277d4f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
File renamed without changes.
21 changes: 21 additions & 0 deletions projects/panic/cards/mute_sound.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit d277d4f

Please sign in to comment.