forked from Anish-Malla/Zoom-Automation-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
64 lines (51 loc) · 1.75 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import subprocess
import pyautogui
import time
import pandas as pd
from datetime import datetime
def sign_in(meetingid, pswd):
#Opens up the zoom app
#change the path specific to your computer
#If on windows use below line for opening zoom
#subprocess.call('C:\\myprogram.exe')
#If on mac / Linux use below line for opening zoom
subprocess.call(["/usr/bin/open", "/Applications/zoom.us.app"])
time.sleep(10)
#clicks the join button
join_btn = pyautogui.locateCenterOnScreen('join_button.png')
pyautogui.moveTo(join_btn)
pyautogui.click()
# Type the meeting ID
meeting_id_btn = pyautogui.locateCenterOnScreen('meeting_id_button.png')
pyautogui.moveTo(meeting_id_btn)
pyautogui.click()
pyautogui.write(meetingid)
# Disables both the camera and the mic
media_btn = pyautogui.locateAllOnScreen('media_btn.png')
for btn in media_btn:
pyautogui.moveTo(btn)
pyautogui.click()
time.sleep(2)
# Hits the join button
join_btn = pyautogui.locateCenterOnScreen('join_btn.png')
pyautogui.moveTo(join_btn)
pyautogui.click()
time.sleep(5)
#Types the password and hits enter
meeting_pswd_btn = pyautogui.locateCenterOnScreen('meeting_pswd.png')
pyautogui.moveTo(meeting_pswd_btn)
pyautogui.click()
pyautogui.write(pswd)
pyautogui.press('enter')
# Reading the file
df = pd.read_csv('timings.csv')
while True:
# checking of the current time exists in our csv file
now = datetime.now().strftime("%H:%M")
if now in str(df['timings']):
row = df.loc[df['timings'] == now]
m_id = str(row.iloc[0,1])
m_pswd = str(row.iloc[0,2])
sign_in(m_id, m_pswd)
time.sleep(40)
print('signed in')