forked from OskarZyg/PyAutomation
/
main.py
29 lines (27 loc) · 881 Bytes
/
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
import webbrowser
import pyautogui
from time import sleep
from win10toast import ToastNotifier
n = ToastNotifier()
while True:
File = open("C:/Users/XXX/AppleShortcuts/action.txt", "r+")
Action = File.readline(2).strip("\n")
if Action == "yt":
webbrowser.open("https://youtube.com/")
File.truncate(0)
elif Action == "mc":
MinecraftVersion = File.read().strip("\n")
pyautogui.moveTo(x=201, y=1066)
pyautogui.click()
sleep(5)
pyautogui.moveTo(x=299, y=83)
pyautogui.click()
if MinecraftVersion == "1.15":
pyautogui.moveTo(x=1417, y=201)
pyautogui.click()
else:
n.show_toast("AppleShortcuts", f"Version {MinecraftVersion} is unsuppurted!", duration = 10)
File.truncate(0)
else:
pass
File.close()