-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
120 lines (80 loc) · 2.6 KB
/
main.py
File metadata and controls
120 lines (80 loc) · 2.6 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import subprocess
import pyautogui
import time
import pandas as pd
from datetime import datetime
#Starting the session
def sign_in(meetingid, pswd):
subprocess.Popen('C:\\Program Files (x86)\\Webex\\Webex\\Applications\\ptoneclk.exe')
time.sleep(10)
# Type the meeting ID
meeting_id_btn = pyautogui.locateCenterOnScreen('alt_join2.png')
pyautogui.moveTo(meeting_id_btn)
pyautogui.click()
time.sleep(2)
# Clearing the old ID
pyautogui.press('backspace', presses=11)
# Entering the ID
pyautogui.write(meetingid)
pyautogui.press('enter')
# Hits the join button
#join_btn = pyautogui.locateCenterOnScreen('join.png')
#pyautogui.moveTo(join_btn)
#pyautogui.click()
time.sleep(10)
#Types the password and hits enter
meeting_pswd_btn = pyautogui.locateCenterOnScreen('pass.png')
pyautogui.moveTo(meeting_pswd_btn)
pyautogui.click()
pyautogui.write(pswd)
pyautogui.press('enter')
time.sleep(15)
# Hits the join meeting button
#join_btn = pyautogui.locateAllOnScreen('join_meeting.png')
#pyautogui.moveTo(join_btn)
#pyautogui.click()
pyautogui.press('enter')
# Ending the session
def sign_out():
#subprocess.Popen('C:\\Windows\\system32\\Taskmgr.exe')
#time.sleep(10)
# Selecting the webex app 1
#terminate_1 = pyautogui.locateCenterOnScreen('webex1.png')
#pyautogui.moveTo(terminate_1)
#pyautogui.click()
#pyautogui.click(button='right')
# End task 1
#end_task = pyautogui.locateCenterOnScreen('end_task.png')
#pyautogui.moveTo(end_task)
#pyautogui.click()
# Selecting the webex app 2
#terminate_1 = pyautogui.locateCenterOnScreen('webex2.png')
#pyautogui.moveTo(terminate_1)
#pyautogui.click()
#pyautogui.click(button='right')
# End task 2
#end_task = pyautogui.locateCenterOnScreen('end_task.png')
#pyautogui.moveTo(end_task)
#pyautogui.click()
exit_btn = pyautogui.locateOnScreen('exit.png')
pyautogui.moveTo(exit_btn)
pyautogui.click()
time.sleep(2)
pyautogui.press('enter')
# Reading the file
df = pd.read_csv('timings.csv')
while True:
# checking of the current time exists in the 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')
if now in str(df['end']):
row = df.loc[df['end'] == now]
sign_out()
time.sleep(20)
print('signed out')