forked from prathimacode-hub/Awesome_Python_Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
68 lines (53 loc) · 1.83 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
65
66
67
68
# Initial Imports
import subprocess
import pyautogui
import time
import pandas as pd
from datetime import datetime
# Sign in method for the bot to sign in to zoom app
def sign_in_zoom(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
joining_btn = pyautogui.locateCenterOnScreen('join_button.png')
pyautogui.moveTo(joining_btn)
pyautogui.click()
# Type the meeting ID
meet_id = pyautogui.locateCenterOnScreen('meeting_id_button.png')
pyautogui.moveTo(meet_id)
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
joining_btn = pyautogui.locateCenterOnScreen('joining_btn.png')
pyautogui.moveTo(joining_btn)
pyautogui.click()
time.sleep(5)
#Types the password and hits enter
meet_password_btn = pyautogui.locateCenterOnScreen('meeting_pswd.png')
pyautogui.moveTo(meet_password_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_zoom(m_id, m_pswd)
time.sleep(40)
print('signed in')