Skip to content

Instantly share code, notes, and snippets.

@lanewinfield
Created December 16, 2020 19:26
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lanewinfield/e9a7e3e3f2537089bfcb74b754f5983d to your computer and use it in GitHub Desktop.
Save lanewinfield/e9a7e3e3f2537089bfcb74b754f5983d to your computer and use it in GitHub Desktop.
tell application "System Events" to set zoom_launch to exists (processes where name is "zoom.us")
if zoom_launch is true then
tell application "zoom.us"
activate
tell application "System Events"
keystroke "w" using {command down}
end tell
try
tell application "System Events"
tell front window of (first application process whose frontmost is true)
click button 1
end tell
end tell
end try
quit
end tell
return
end if
tell application "Google Chrome"
set windowList to every tab of every window whose URL contains "meet.google.com"
repeat with tabList in windowList
set tabList to tabList as any
repeat with tabItr in tabList
set tabItr to tabItr as any
delete tabItr
end repeat
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment