Created
December 22, 2021 04:52
-
-
Save uphy/e1537d4caf91a88385412078744a47c1 to your computer and use it in GitHub Desktop.
Mute Zoom Audio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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