Skip to content

Instantly share code, notes, and snippets.

@adamturtle
Last active February 6, 2019 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamturtle/ca7f5aab80fde28ef1d6ac2c2ac8eb07 to your computer and use it in GitHub Desktop.
Save adamturtle/ca7f5aab80fde28ef1d6ac2c2ac8eb07 to your computer and use it in GitHub Desktop.
Toggle the microphone audio in Zoom

You can also use an app like FastScripts to assign this behaviour to a keyboard shortcut

set appName to "zoom.us"
if not is_running(appName) then
return
end if
focus(appName)
set menuName to "Meeting"
set mute to "Mute Audio"
set unmute to "Unmute Audio"
tell application "System Events" to tell process appName
if menu item unmute of menu 1 of menu bar item menuName of menu bar 1 exists then
click menu item unmute of menu 1 of menu bar item menuName of menu bar 1
else if menu item mute of menu 1 of menu bar item menuName of menu bar 1 exists then
click menu item mute of menu 1 of menu bar item menuName of menu bar 1
end if
end tell
on is_running(appName)
tell application "System Events" to (name of processes) contains appName
end is_running
on focus(appName)
tell application "System Events" to tell application process appName
set frontmost to true
end tell
end focus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment