forked from sarthakd999/Hacktoberfest2021-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
automation.py
77 lines (46 loc) · 1.73 KB
/
automation.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
69
70
71
72
73
74
75
76
77
# Here we will make a Zoom automation system
import os
import pyautogui
import pandas as pd
import time
from datetime import datetime
def signIn(meeting_id, password):
#Opening Zoom application
os.startfile(r"C:\Users\ratul\Desktop\PICS\Zoom")
time.sleep(2)
# Now we operate the button to join a meeting
join = pyautogui.locateCenterOnScreen("Zoom-Automation\zoom_join1.png")
pyautogui.moveTo(join)
pyautogui.click()
# meeting id
meetingidbtn = pyautogui.locateCenterOnScreen("Zoom-Automation\meetingid.jpg")
pyautogui.moveTo(meetingidbtn)
pyautogui.write(meeting_id)
time.sleep(1)
#enter
pyautogui.press('enter')
#passcode blank
passcode= pyautogui.locateCenterOnScreen("Zoom-Automation\passcode.jpg")
pyautogui.moveTo(passcode)
pyautogui.write(password)
time.sleep(1)
#enter
pyautogui.press('enter')
#Read excel sheet
df = pd.read_excel('Zoom-Automation\zoom1.xlsx') #df stands for data frame
while True:
# Would be checking the date time continiusly in an infinite loop
now = datetime.now().strftime("%H:%M") #will be looking at the Date and only hours and minutes.
if now in str(df['Timings']):
# for iterating
mylist=df["Timings"]
mylist=[i.strftime("%H:%M") for i in mylist]
c= [i for i in range(len(mylist)) if mylist[i]==now]
row = df.loc[c]
# row = df.loc[df['Timings'] == now] #loc used to locate specific rows
id = str(row.iloc[0,1])
password = str(row.iloc[0,2])
signIn(id, password)
time.sleep(50)
print('signed in !!')
repeat(password)