Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions main.pyw
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import pyautogui as autogui
#!/bin/env python
import json
import tkinter as tk
import os
import subprocess
import platform

if (platform.system() == "Windows"):
# autogui is only used on windows (right now) and adds scrot as a dependency on linux
import pyautogui as autogui


class ZoomData:
def __init__(self, meetingId, abbreviation, professor, pwd):
Expand All @@ -30,7 +34,7 @@ def createCourseTitle(course):
def getPlatfromCommand(x, zoomData):
switcher = {
'Windows':"%APPDATA%\Zoom\\bin\Zoom.exe --url=\"zoommtg://zoom.us/join?action=join&confno=" + zoomData.meetingId + "\"",
'Linux':"zoom --url=\"zoommtg://zoom.us/join?action=join&confno=" + zoomData.meetingId + "\"",
'Linux':"zoom \"zoommtg://zoom.us/join?action=join&confno=" + zoomData.meetingId + "\"",
}
val = switcher.get(x)
if val == None:
Expand All @@ -41,10 +45,12 @@ def joinMeeting(zoomData):
subprocess.Popen(getPlatfromCommand(platform.system(), zoomData), shell=True)

# enter passcode
enter_meeting_passcode = autogui.locateCenterOnScreen('img/enter-meeting-passcode.png', confidence=0.7)
while enter_meeting_passcode == None:
# currently only works on Windows
if (platform.system() == "Windows"):
enter_meeting_passcode = autogui.locateCenterOnScreen('img/enter-meeting-passcode.png', confidence=0.7)
autogui.write(zoomData.pwd)
while enter_meeting_passcode == None:
enter_meeting_passcode = autogui.locateCenterOnScreen('img/enter-meeting-passcode.png', confidence=0.7)
autogui.write(zoomData.pwd)


zoomDataEntries = getZoomDataEntries()
Expand Down