forked from Owlkaline/Overwatch-League-Token-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
login_battlenet.py
executable file
·50 lines (38 loc) · 1008 Bytes
/
login_battlenet.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
from OwlSettings import settings as owl_settings;
import time
import pyautogui
import webbrowser
import sys;
url = 'https://www.blizzard.com/en-us/';
my_account = [1979, 28];
logout_button = [1860, 250];
login_button = [1939, 89];
username_box = [1228, 251];
password_box = [1228, 307];
settings = owl_settings.Settings();
info = settings.battlenet_info();
username = info[0];
password = info[1];
settings.log("Logging into battle.net...");
time.sleep(10)
settings.open_system_browser(url);
time.sleep(5)
pyautogui.press('f11');
time.sleep(1)
settings.click(my_account)
settings.click(logout_button)
time.sleep(5)
settings.click(my_account)
settings.click(login_button)
time.sleep(5)
settings.click(username_box)
pyautogui.hotkey('ctrl', 'a');
time.sleep(1)
pyautogui.press('backspace');
pyautogui.typewrite(username)
settings.click(password_box)
pyautogui.typewrite(password)
pyautogui.typewrite('\n')
pyautogui.press('f11');
settings.log("Battle.net should now be logged in.");
time.sleep(10)