|
| 1 | +import time |
| 2 | +import webbrowser |
| 3 | +import schedule |
| 4 | +import pyautogui |
| 5 | +from PIL import ImageGrab |
| 6 | +import pyperclip |
| 7 | + |
| 8 | + |
| 9 | +url1 = "PASTE gmeet link/zoom link/zoom meeting id" |
| 10 | +url2 = "PASTE gmeet link/zoom link/zoom meeting id" |
| 11 | + |
| 12 | + |
| 13 | +def gMeet(url): |
| 14 | + webbrowser.open(url) |
| 15 | + time.sleep(3) |
| 16 | + print("Joining Class") |
| 17 | + time.sleep(2) |
| 18 | + pyautogui.hotkey('command', 'd') |
| 19 | + print("Turned off camera") |
| 20 | + pyautogui.hotkey('command', 'e') |
| 21 | + print("Turned off mic") |
| 22 | + time.sleep(3) |
| 23 | + |
| 24 | + for i in range(4): |
| 25 | + pyautogui.press('tab') |
| 26 | + |
| 27 | + time.sleep(3) |
| 28 | + pyautogui.press('enter') |
| 29 | + |
| 30 | + |
| 31 | +def zMeet(url): |
| 32 | + #copy link |
| 33 | + pyperclip.copy(url) |
| 34 | + |
| 35 | + time.sleep(0.2) |
| 36 | + |
| 37 | + pyautogui.press('esc', interval=0.1) |
| 38 | + |
| 39 | + time.sleep(0.3) |
| 40 | + |
| 41 | + #open shart |
| 42 | + pyautogui.press('win', interval=0.5) |
| 43 | + #type zoom |
| 44 | + pyautogui.write('zoom') |
| 45 | + time.sleep(2) |
| 46 | + #press enter |
| 47 | + pyautogui.press('enter', interval=0.5) |
| 48 | + |
| 49 | + time.sleep(8) |
| 50 | + |
| 51 | + #Click zoom button |
| 52 | + x, y = pyautogui.locateCenterOnScreen('zoom_btn.png') |
| 53 | + pyautogui.click(x, y) |
| 54 | + |
| 55 | + pyautogui.press('enter', interval=0.5) |
| 56 | + |
| 57 | + #paste link |
| 58 | + pyautogui.hotkey('ctrl', 'v') |
| 59 | + |
| 60 | + #use tabs to move to next section |
| 61 | + pyautogui.press('tab', interval=0.5) |
| 62 | + pyautogui.press('tab', interval=0.5) |
| 63 | + pyautogui.press('tab', interval=0.5) |
| 64 | + pyautogui.press('enter', interval=0.5) #mute mic |
| 65 | + |
| 66 | + pyautogui.press('tab', interval=0.5) |
| 67 | + pyautogui.press('enter', interval=0.5) #turn off camera |
| 68 | + |
| 69 | + pyautogui.press('tab', interval=0.5) |
| 70 | + pyautogui.press('enter', interval=3) #join zoom link |
| 71 | + |
| 72 | + |
| 73 | +if __name__ == "__main__": |
| 74 | + schedule.every().day.at("16:00").do(gMeet(url1) if ( |
| 75 | + url1.startswith("https://meet")) else zMeet(url1)) |
| 76 | + schedule.every().day.at("06:00").do(gMeet(url2) if ( |
| 77 | + url2.startswith("https://meet")) else zMeet(url2)) |
| 78 | + |
| 79 | + while True: |
| 80 | + schedule.run_pending() # check if we need to run anything |
| 81 | + time.sleep(10) # wait 10 second before checking again''' |
0 commit comments