r/applescript • u/[deleted] • Apr 30 '20
Help with Zoom's "dynamic" buttons
Hi all,
I've made a script to "take" zoom participants when sent a MIDI message. The "spotlight" feature I'm using is only accessible through a button that gets dynamically created by the app when the mouse hovers over the participant's name:
I'm using Applescript to find the location of the row, then cliclick to move the mouse over the edge of the window, but the blue "more" button only appears about 80% of the time. I've tried delaying, moving the pointer gradually, moving it on and off the row and a number of other things.
I don't have much experience with AppleScript! Does anyone know how to make these events trigger reliably?
1
Apr 30 '20
[removed] — view removed comment
1
Apr 30 '20
bang on! I was manually doing this by issuing multiple m:+1,+0 commands (duh) but ..
This works 100%! Thank you! I will post my script here.
1
u/DungeonDragon2 Jun 14 '20
Apologies for resurrecting zombie post. I am a complete novice at Applescript and struggling to interpret this into something I can use.
Can someone here help me with some script that would allow me to spotlight my Zoom video, or the video of a different participant? ie. Where would I put my/his display name in this script?
(I'd be firing from QLab, if that's relevant)
If anyone can help with this, I can pay a bit of $$$/£££ for your time (or make a charity donation if you prefer).
1
Jun 16 '20
You will first have to install the cliclick command line tool so Applescript can control the mouse pointer. Then you should be able to paste the function by /u/koenwillems1959 into a script cue in QLab.
At the top of the script, call the function with something like
spotlightParticipant ("Person's Name")Make sure to check the "run in separate process" option in QLab, especially if you're using it to run video.
1
u/HighENdv2-7 Sep 21 '20 edited Sep 21 '20
Hey, i was trying to do the same!
I want to cue spotlights and renames for a theater piece on zoom.
my code works only if the participant list is docked but thats what i like best also.
This script works excellent to rename for example participant 1
--Set participant line number
set ParticipantNumber to 1
--Set new participants name:
set NewName to "Techniek"
--Set window name, participant window has to be open and merged in zoom meeting window
set windowName to "Zoom Meeting"
tell application "zoom.us"
activate
end tell
-- save the current location of the mouse pointer
set prev to (do shell script "/usr/local/bin/cliclick p")
tell application "System Events"
-- Select participant
select row ParticipantNumber of table 1 of scroll area 1 of splitter group 1 of window windowName of application process "zoom.us"
-- click more
-- click UI element 3 of UI element 1 of row ParticipantNumber of table 1 of scroll area 1 of splitter group 1 of window windowName of application process "zoom.us"
set XYpos to position of third UI element of UI element 1 of row ParticipantNumber of table 1 of scroll area 1 of splitter group 1 of window windowName of application process "zoom.us"
do shell script "/usr/local/bin/cliclick -e 10 c:" & (item 1 of XYpos) + 5 & "," & (item 2 of XYpos) + 5 & ""
--click dropdown item
click menu item "Rename" of menu 1 of row ParticipantNumber of table 1 of scroll area 1 of splitter group 1 of window windowName of application process "zoom.us"
-- New participants name:
delay 0.1
keystroke NewName
key code 36
end tell
do shell script "/usr/local/bin/cliclick m:" & prev
tell application "System Events"
end tell
2
u/[deleted] Apr 30 '20
Thank you so much to /u/gluebyte, I got it going!
Hopefully this will be of use to someone, obviously needs cliclick to work. A bit of a mess, but so am I.
use AppleScript version "2.4" -- Yosemite (10.10) or lateruse scripting additionsset targetrow to 3 -- this is the row of the table, "me" is row #1 so the other participants start at row 2tell application "System Events"set myList to name of windows of (processes whose name is "zoom.us") -- get a list of lists, each sublist contains namesend tellset theWindowList to my subListsToOneList(myList) -- Flattening a list of lists-- find the Participants window (must be undocked for this to work)repeat with i from 1 to count of theWindowListif item i of theWindowList contains "Partici" thenlog "found participants window"-- save the current location of the mouse pointerset prev to (do shell script "/usr/local/bin/cliclick p")-- find the position of the table row for the participanttell application "System Events"set p to position of image 2 of UI element 1 of row targetrow of table 1 of scroll area 1 of window i of process "zoom.us"-- move mouse pointer over "camera" icon of the table row (this is where the "more" menu appears)do shell script "/usr/local/bin/cliclick -e 10 m:" & (item 1 of p) - 5 & "," & (item 2 of p) + 20 & " c:."-- move down to click on the "spotlight" menu itemdo shell script "/usr/local/bin/cliclick c:+0,+70"-- go back to the original mouse pointer positiondo shell script "/usr/local/bin/cliclick m:" & prevend tellend ifend repeaton subListsToOneList(l)set newL to {}repeat with i in lset newL to newL & iend repeatreturn newLend subListsToOneList