Skip to content

Instantly share code, notes, and snippets.

@damc-dev
Last active March 8, 2024 15:13
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damc-dev/7431045c93fcb569140f2d2ef8afd878 to your computer and use it in GitHub Desktop.
Save damc-dev/7431045c93fcb569140f2d2ef8afd878 to your computer and use it in GitHub Desktop.
Applescript to Retrieve Participants From Zoom MacOS App
#!/usr/bin/osascript
on convertListToString(theList, theDelimiter)
set AppleScript's text item delimiters to theDelimiter
set theString to theList as string
set AppleScript's text item delimiters to ""
return theString
end convertListToString
on get_participants()
set participantList to {}
tell application "System Events"
set myList to name of windows of process "zoom.us" -- get a list of windows
repeat with i from 1 to count of myList
if item i of myList contains "Partici" then
-- Participants list is popped out
set rowList to rows of outline 1 of scroll area 1 of window i of process "zoom.us"
repeat with rowItem in rowList
set end of participantList to value of UI element 1 of UI element 1 of rowItem
end repeat
return participantList
else if (exists static text 1 of UI element 1 of splitter group 1 of window i of process "zoom.us") and (value of static text 1 of UI element 1 of splitter group 1 of window i of process "zoom.us" contains "Partici") then
-- Participants list is merged to meeting window
set rowList to rows of outline 1 of scroll area 1 of splitter group 1 of window i of process "zoom.us"
repeat with rowItem in rowList
set end of participantList to value of UI element 1 of UI element 1 of rowItem
end repeat
return participantList
else
-- there is no Participant list, so make one
click menu item 1 of menu "View" of menu bar 1 of process "zoom.us"
-- is the created Participant list is merged in the meeting window or popped out?
if exists splitter group 1 of window i of process "zoom.us" then
set rowList to rows of outline 1 of scroll area 1 of splitter group 1 of window i of process "zoom.us"
repeat with rowItem in rowList
set end of participantList to value of UI element 1 of UI element 1 of rowItem
end repeat
return participantList
else
set rowList to rows of outline 1 of scroll area 1 of window i of process "zoom.us"
repeat with rowItem in rowList
set end of participantList to value of UI element 1 of UI element 1 of rowItem
end repeat
return participantList
end if
end if
end repeat
end tell
end get_participants
convertListToString(get_participants(), "\n")
@subtleGradient
Copy link

Excellent! Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment