Last active
May 27, 2022 20:51
-
-
Save tyhawkins/66d6f6ca8b3cb30c268df76d83020a64 to your computer and use it in GitHub Desktop.
Get Zoom Mute/Unmute Status
This file contains hidden or 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
property btnTitle : "Mute audio" | |
if application "zoom.us" is running then | |
tell application "System Events" | |
tell application process "zoom.us" | |
if exists (menu item btnTitle of menu 1 of menu bar item "Meeting" of menu bar 1) then | |
set returnValue to "Unmuted" | |
else | |
set returnValue to "Muted" | |
end if | |
end tell | |
end tell | |
else | |
set returnValue to "" | |
end if | |
return returnValue |
Thanks @chrmcg, I actually found what I needed (wanted to poll video start/stop status as well) like this. I'm all set! Menu bar...that was genius.
set zoomStatus to "closed"
set muteStatus to "disabled"
set videoStatus to "stop"
tell application "System Events"
if exists (window 1 of process "zoom.us") then
set zoomStatus to "open"
tell application process "zoom.us"
if exists (menu bar item "Meeting" of menu bar 1) then
set zoomStatus to "call"
if exists (menu item "Mute audio" of menu 1 of menu bar item "Meeting" of menu bar 1) then
set muteStatus to "unmuted"
else
set muteStatus to "muted"
end if
if exists (menu item "Start video" of menu 1 of menu bar item "Meeting" of menu bar 1) then
set videoStatus to "stop"
else
set videoStatus to "start"
end if
end if
end tell
end if
end tell
can someone give me full script that i can use in greasyfork
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@patrickgilsf I use the following in SwiftBar, modified a bit from https://www.nickjvturner.com/blog/2021/01/11/zoom-meeting-mute-state
Seems like the idea could work for your use case?