You can also use an app like FastScripts to assign this behaviour to a keyboard shortcut
Last active
February 6, 2019 15:10
-
-
Save adamturtle/ca7f5aab80fde28ef1d6ac2c2ac8eb07 to your computer and use it in GitHub Desktop.
Toggle the microphone audio in Zoom
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
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