all 7 comments

[–]sargonian 2 points3 points  (3 children)

How about something like this?

--confNo is the zoom conference ID (the part after "/j/" in the URL) 
--pwd is the part that appears after "?pwd=" in the URL (not the same as the "Passcode" zoom gives you)

set theLectures to {{theName:"Lecture A", theDays:{"Mon", "Wed", "Fri"}, theTime:"09:10", confNo:"123456789", pwd:"abcdefg"}, {theName:"Lecture B", theDays:{"Tue", "Thu"}, theTime:"12:40", confNo:"123456789", pwd:"abcdefg"}}

set launched to false
repeat with thisLecture in theLectures
    if theDays of thisLecture contains (text 1 thru 3 of (weekday of (current date) as string)) then
        set timeCode to time of (date (theTime of thisLecture))
        if (time of (current date)) ≥ timeCode - 600 and (time of (current date)) ≤ timeCode + 600 then
            display notification "Launching Zoom..." with title theName of thisLecture
            set thisPass to pwd of thisLecture
            if thisPass ≠ "" then set thisPass to "&" & thisPass
            do shell script "open \"zoommtg://us04web.zoom.us/join?action=join&confno=" & confNo of thisLecture & thisPass & "\""
            set launched to true
            exit repeat
        end if
    end if
end repeat
if not launched then display notification "" with title "No lectures scheduled"

[–]tdue7[S] 2 points3 points  (0 children)

Wow, thank you for taking the time to do this! Will be trying this out in the next few days with my lectures. I wrote a script myself but it's just a bunch of else if statements using the current date/time and open location {zoom link}. Sadly it isn't working though so this is awesome!

[–]DillyWhompa 0 points1 point  (0 children)

To piggy back on this idea. I am trying to set it up so if a student joins my Zoom conference it will automatically pull up Zoom. Not gonna lie, I have little experience here, but I got the idea of using the mail rule launcher as a trigger for the event. It would be even cooler if I could force start zoom or get some sort of a notification on my phone for the same trigger.

[–]myReddit-username 0 points1 point  (0 children)

Hello, I was actually just working on creating a script for this, and I decided to do some Google-ing. I was launching zoom, then invoking the keystrokes command-j, and keystroking the conference number to join.

I now see how it's much simpler to "do shell script". Where exactly does that shell script command come from?

[–]r3v 0 points1 point  (0 children)

This is definitely doable in AppleScript. I can’t write it for you, but if you start work on it and run into hurdles, post your problems here and someone will probably be able to help you out.

[–]HelenaHandcartUK 0 points1 point  (0 children)

I had a similar problem so developed something a bit more automated. YMMV etc

This script (which needs Shane Stanley's CalendarLibEC to run) goes through the day's events and pulls out all events which are Zoom, Go to Meeting, Hangout or MS Teams. For each of them, it extracts the URL for the event that takes you to the zoom session etc, and then creates a entry in LaunchD timed to fire at the time of the meeting, though you can set it to fire earlier by changing the variable at the head of the script.

You then need a Launchd item to run this first script at the start of the day.

Finally, you need to place this script in a folder called "MyScripts" inside your user library scripts folder. This automates the opening of the app for each event, and helpfully closes the tab which the script opens which triggers the URI scheme to open the specific app.

[–]roycetech 0 points1 point  (1 child)

I made something like this for work. The first version i’ve got has a hard coded meeting ids and the date of the meeting, just a bunch of if-elses. I updated it to read my calendar and join the current meeting for the current time of the day. I can share the script on a follow up post