- Open your Zoom.app window.
- Open Automator
- Select Create new Workflow or Create new Action
- Press RED button. This will activate Automator recording window of all your following manual actions.
- Accomplish manually 4 actions you described in the question.
- Close Automator recording window
- Drag written by Automator actions down to code area. One by one. This will show you its scripts. Remains copying the useful content from the script generated by the Automator. And cleaning the external quotes and escapes.
For example: I wrote using the Automator my click action on the current webpage.
Here is generated Automator code:
on run {input, parameters}
-- Mouse Clicked
delay 7.956482
set timeoutSeconds to 2.000000
set uiScript to "click group 1 of list 2 of group 8 of UI Element 1 of scroll area 1 of group 1 of group 1 of tab group 1 of splitter group 1 of window \"javascript - Toggle Audio-Output On/Off within Zoom Meetings (MacOS) - Stack Overflow\" of application process \"Safari\""
my doWithTimeout( uiScript, timeoutSeconds )
return input
end run
on doWithTimeout(uiScript, timeoutSeconds)
set endDate to (current date) + timeoutSeconds
repeat
try
run script "tell application \"System Events\"
" & uiScript & "
end tell"
exit repeat
on error errorMessage
if ((current date) > endDate) then
error "Can not " & uiScript
end if
end try
end repeat
end doWithTimeout
I take from the script above only this useful content. As you can see I grab only the correct UI action (the value of uiScript variable) :
tell application "System Events" to tell application process "Safari"
set frontmost to true -- required
click group 1 of list 2 of group 8 of UI element 1 of scroll area 1 of group 1 of group 1 of tab group 1 of splitter group 1 of window "javascript - Toggle Audio-Output On/Off within Zoom Meetings (MacOS) - Stack Overflow"
end tell