Last active
March 23, 2021 11:58
-
-
Save cristoslc/9d30eaabfc06e15587964e16c5aca70f to your computer and use it in GitHub Desktop.
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
try | |
tell application "zoom.us" | |
activate | |
end tell | |
tell application "System Events" | |
# Get the frontmost app's *process* object. | |
set frontAppProcess to first application process whose frontmost is true | |
end tell | |
delay 0.5 | |
# Tell the *process* to count its windows and return its front window's name. | |
tell frontAppProcess | |
if (count of windows) > 0 then | |
get every window | |
repeat with W in the result | |
select W | |
set window_name to name of W | |
if window_name is "Zoom Meeting" then | |
tell application "System Events" | |
keystroke "w" using (command down) | |
delay 0.5 | |
key code 36 | |
end tell | |
end if | |
end repeat | |
end if | |
end tell | |
end try |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment