Skip to content

Instantly share code, notes, and snippets.

@uphy
Created December 22, 2021 04:52
Show Gist options
  • Save uphy/e1537d4caf91a88385412078744a47c1 to your computer and use it in GitHub Desktop.
Save uphy/e1537d4caf91a88385412078744a47c1 to your computer and use it in GitHub Desktop.
Mute Zoom Audio
import subprocess
def set_zoom_audio_muted(muted:bool):
subprocess.run("""osascript -e '
on setAudioMuted(muted)
activate application "zoom.us"
delay 0.5
tell application "System Events"
tell process "zoom.us"
tell window "Zoomミーティング"
if description of button 1 is "音声をミュート" then
if muted then
click button 1
end if
else if description of button 1 is "自分のオーディオをミュート解除" then
if not muted then
click button 1
end if
end if
end tell
end tell
end tell
end setAudioMuted
setAudioMuted(%s)
'
""" % ("true" if muted else "false"), shell=True)
set_zoom_audio_muted(False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment