-
Notifications
You must be signed in to change notification settings - Fork 0
/
Teams.py
81 lines (78 loc) · 2.23 KB
/
Teams.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
78
79
80
81
import os
import pyautogui
import intervals as I
import time
from time import sleep
from datetime import datetime
try:
# open MS Teams application
os.startfile("C:/Users/username/AppData/Local/Microsoft/Teams/current/Teams.exe")
sleep(2)
# settings
settings = pyautogui.locateCenterOnScreen("settings.PNG")
pyautogui.moveTo(settings)
pyautogui.click()
time.sleep(2)
# manageteams.PNG
manageteams = pyautogui.locateCenterOnScreen("manageteams.PNG")
pyautogui.moveTo(manageteams)
pyautogui.click()
time.sleep(2)
except Exception as e:
print(e)
while True:
#andromeda
k = datetime.now().strftime("%H")
now = int(k)
if now in I.closed(16, 17):
andromeda = pyautogui.locateCenterOnScreen("Andromeda.PNG")
pyautogui.moveTo(andromeda)
pyautogui.click()
time.sleep(2)
join = pyautogui.locateCenterOnScreen("join.PNG")
pyautogui.moveTo(join)
pyautogui.click()
time.sleep(2)
audiooff = pyautogui.locateCenterOnScreen("audiooff.PNG")
pyautogui.moveTo(audiooff)
pyautogui.click()
time.sleep(2)
if now == 17:
cut = pyautogui.locateCenterOnScreen("cut.PNG")
pyautogui.moveTo(cut)
pyautogui.click()
time.sleep(2)
dismiss = pyautogui.locateCenterOnScreen("dismiss.PNG")
pyautogui.moveTo(dismiss)
pyautogui.click()
time.sleep(2)
back = pyautogui.locateCenterOnScreen("back.PNG")
pyautogui.moveTo(back)
pyautogui.click()
time.sleep(2)
elif now in I.closed(17, 18):
automation = pyautogui.locateCenterOnScreen("automation.PNG")
pyautogui.moveTo(automation)
pyautogui.click()
time.sleep(2)
join = pyautogui.locateCenterOnScreen("join.PNG")
pyautogui.moveTo(join)
pyautogui.click()
time.sleep(2)
audiooff = pyautogui.locateCenterOnScreen("audiooff.PNG")
pyautogui.moveTo(audiooff)
pyautogui.click()
time.sleep(2)
if now == 18:
cut = pyautogui.locateCenterOnScreen("cut.PNG")
pyautogui.moveTo(cut)
pyautogui.click()
time.sleep(2)
dismiss = pyautogui.locateCenterOnScreen("dismiss.PNG")
pyautogui.moveTo(dismiss)
pyautogui.click()
time.sleep(2)
back = pyautogui.locateCenterOnScreen("back.PNG")
pyautogui.moveTo(back)
pyautogui.click()
time.sleep(2)