Skip to content

Instantly share code, notes, and snippets.

@tyhawkins
Last active May 27, 2022 20:51
Show Gist options
  • Save tyhawkins/66d6f6ca8b3cb30c268df76d83020a64 to your computer and use it in GitHub Desktop.
Save tyhawkins/66d6f6ca8b3cb30c268df76d83020a64 to your computer and use it in GitHub Desktop.
Get Zoom Mute/Unmute Status
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
@patrickgilsf
Copy link

patrickgilsf commented Mar 18, 2022

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

@IdiotRat
Copy link

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