This repository has been archived by the owner on Dec 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Glyph_Login.ahk
593 lines (553 loc) · 18.3 KB
/
Glyph_Login.ahk
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
#NoEnv
#SingleInstance, Force
OnExit(ObjBindMethod(exitclass,"DoBeforeExit"))
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTitleMatchMode, 2
SetControlDelay -1
SetKeyDelay, 20, 5
;//SECTION Remarks
/*
Note: "//(!)<name>" are bookmarks (from a VS Code extension):
https://marketplace.visualstudio.com/items?itemName=ExodiusStudios.comment-anchors
╔════════════════════════════════════════════════════════════════════════════════╗
║╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳╳║
╠════════════════════════════════════════════════════════════════════════════════╣
║ Discord: Lukegotjellyfish#0473 ║
║ GitHub rep: https://github.com/lukegotjellyfish/Trove-Login-Gitrelease ║
╚════════════════════════════════════════════════════════════════════════════════╝
*/
;//!SECTION Remarks
;//SECTION Global Vars
global normal_sleep := 300
global wait_for_trove_to_open := 5
global how_long_until_restart := 3600000
global wait_for_glyph_to_login := 2200
;//!SECTION Global Vars
login := []
trove_directory := "C:\Program Files (x86)\Steam\steamapps\common\Trove"
autohotkey_directory := "D:\Code\AHK\AHK 1.1\%autohotkey_directory%"
;//SECTION Fetch login details
if FileExist("database.txt") ;//ANCHOR Email reading
{
Loop, Read, database.txt
{
login.Push(A_LoopReadLine)
}
;generate list to display emails on GUI
counter = 0
for x, item in login
{
if (Mod(x, 2) = 1)
{
string_of_emails .= (x - counter) . " - " . item . "`n"
counter += 1
}
}
try
{
RunWait, GlyphClientApp.exe, %trove_directory%, 5
}
catch
{
Run, %autohotkey_directory%, Error_Display.ahk, 1
}
;//ANCHOR Launch GUI
Gui, +AlwaysOnTop
Gui, Add, Tab, x-6 y-2 w250 h225, Launch Options|Info|Emails
Gui, Tab, Launch Options
howlonguntilrestartseconds := Round(how_long_until_restart / 60000, 2)
Gui, Add, CheckBox, x32 y29 w150 h30 vOpenBackpack, F3 To Open backpack on all clients, when in-game
Gui, Add, CheckBox, x32 y58 w150 h30 vLaunchFishingBot, Start Nippy's fishing bot upon launch ;'
Gui, Add, CheckBox, x32 y90 w150 h30 vRestartEveryDelay, Restart clients every %howlonguntilrestartseconds% minutes
Gui, Add, CheckBox, x32 y118 w150 h30 vlaunch_with_gui, Launch with Option_Gui
Gui, Add, Button, x22 y155 w200 h40 glaunchthemainscript, Launch
Gui, Tab, Info
Gui, Add, Text, x12 y29 w220 h70, Made by BLURREDDOGE / JELLYMAN123`nCopyright 2018`, Luke Roper
Gui, Add, Text, x12 y99 w220 h42 +border, - You are free to edit and redistribute this according to
Gui, Tab, Emails
Gui, Add, Button, x22 y25 w200 h190 gshowemails, Show Emails
Gui, Show, x100 y225 h220 w240, Launcher
return ;pause at GUI for the user to continue with buttons
;//ANCHOR Display all emails
showemails:
{
MsgBox,0,Emails, Emails entered: `n%string_of_emails%
}
return
;//ANCHOR Submit+Destroy GUI
launchthemainscript:
{
Gui, Submit
Gui, Destroy
}
if (launch_with_gui = 1)
{
Run, %autohotkey_directory% Option_Gui.ahk %OpenBackpack% %LaunchFishingBot% %RestartEveryDelay%
}
;//SECTION Runmodes
;//ANCHOR Restart every x
if (RestartEveryDelay = 1)
{
loop
{
window_setup(1, 0, login)
if (LaunchFishingBot)
{
Send, ^{Numpad1} ;Nippy's fishing bot: start all
}
if (OpenBackpack)
{
Run, %autohotkey_directory% Open_Backpack.ahk
}
Sleep, %how_long_until_restart%
loop, 30
{
WinKill, Client%A_Index%
}
}
}
;//ANCHOR One-run
else
{
window_setup(1, 0, login)
Sleep, %normal_sleep%
if (LaunchFishingBot)
{
Send, ^{Numpad1}
}
if (OpenBackpack)
{
Run, %autohotkey_directory%, Open_Backpack.ahk
}
ExitApp
}
;//!SECTION Runmodes
}
;//!SECTION Fetch login details
;//SECTION Create login details
IfNotExist, database.txt ;//ANCHOR Account adding
{
MsgBox, You do not need to fill in all the boxes`, only the ones you want.
Gui, New,, Create Email & Password Database
Gui, Color, A9A9A9
;//SECTION Gui-Groups
;//ANCHOR Gui Group 1
Gui, Add, groupbox, x10 y5 w180 h105
Gui, Add, Text, x15 y15, Email 1:
Gui, Add, Edit, w170 vEmail_One
Gui, Add, Text, x15 y65, Password 1:
Gui, Add, Edit, w170 Password vPassword_One
;//ANCHOR Gui Group 7
Gui, Add, groupbox, x200 y5 w180 h105
Gui, Add, Text, x205 y15, Email 7:
Gui, Add, Edit, w170 vEmail_Seven
Gui, Add, Text, x205 y65, Password 7:
Gui, Add, Edit, w170 Password vPassword_Seven
;//ANCHOR Gui Group 13
Gui, Add, groupbox, x390 y5 w180 h105
Gui, Add, Text, x395 y15, Email 13:
Gui, Add, Edit, w170 vEmail_Thirteen
Gui, Add, Text, x395 y65, Password 13:
Gui, Add, Edit, w170 Password vPassword_Thirteen
;//ANCHOR Gui Group 19
Gui, Add, groupbox, x580 y5 w180 h105
Gui, Add, Text, x585 y15, Email 19:
Gui, Add, Edit, w170 vEmail_Nineteen
Gui, Add, Text, x585 y65, Password 19:
Gui, Add, Edit, w170 Password vPassword_Nineteen
;//ANCHOR Gui Group 25
Gui, Add, groupbox, x770 y5 w180 h105
Gui, Add, Text, x775 y15, Email 25:
Gui, Add, Edit, w170 vEmail_TwentyFive
Gui, Add, Text, x775 y65, Password 25:
Gui, Add, Edit, w170 Password vPassword_TwentyFive
;//ANCHOR Gui Group 2
Gui, Add, groupbox, x10 y110 w180 h105
Gui, Add, Text, x15 y120, Email 2:
Gui, Add, Edit, w170 vEmail_Two
Gui, Add, Text, x15 y170, Password 2:
Gui, Add, Edit, w170 Password vPassword_Two
;//ANCHOR Gui Group 8
Gui, Add, groupbox, x200 y110 w180 h105
Gui, Add, Text, x205 y120, Email 8:
Gui, Add, Edit, w170 vEmail_Eight
Gui, Add, Text, x205 y170, Password 8:
Gui, Add, Edit, w170 Password vPassword_Eight
;//ANCHOR Gui Group 14
Gui, Add, groupbox, x390 y110 w180 h105
Gui, Add, Text, x395 y120, Email 14:
Gui, Add, Edit, w170 vEmail_Fourteen
Gui, Add, Text, x395 y170, Password 14:
Gui, Add, Edit, w170 Password vPassword_Fourteen
;//ANCHOR Gui Group 20
Gui, Add, groupbox, x580 y110 w180 h105
Gui, Add, Text, x585 y120, Email 20:
Gui, Add, Edit, w170 vEmail_Twenty
Gui, Add, Text, x585 y170, Password 20:
Gui, Add, Edit, w170 Password vPassword_Twenty
;//ANCHOR Gui Group 26
Gui, Add, groupbox, x770 y110 w180 h105
Gui, Add, Text, x775 y120, Email 26:
Gui, Add, Edit, w170 vEmail_TwentySix
Gui, Add, Text, x775 y170, Password 26:
Gui, Add, Edit, w170 Password vPassword_TwentySix
;//ANCHOR Gui Group 3
Gui, Add, groupbox, x10 y215 w180 h105
Gui, Add, Text, x15 y225, Email 3:
Gui, Add, Edit, w170 vEmail_Three
Gui, Add, Text, x15 y275, Password 3:
Gui, Add, Edit, w170 Password vPassword_Three
;//ANCHOR Gui Group 9
Gui, Add, groupbox, x200 y215 w180 h105
Gui, Add, Text, x205 y225, Email 9:
Gui, Add, Edit, w170 vEmail_Nine
Gui, Add, Text, x205 y275, Password 9:
Gui, Add, Edit, w170 Password vPassword_Nine
;//ANCHOR Gui Group 15
Gui, Add, groupbox, x390 y215 w180 h105
Gui, Add, Text, x395 y225, Email 15:
Gui, Add, Edit, w170 vEmail_Fifthteen
Gui, Add, Text, x395 y275, Password 15:
Gui, Add, Edit, w170 Password vPassword_Fiftheen
;//ANCHOR Gui Group 21
Gui, Add, groupbox, x580 y215 w180 h105
Gui, Add, Text, x585 y225, Email 21:
Gui, Add, Edit, w170 vEmail_TwentyOne
Gui, Add, Text, x585 y275, Password 21:
Gui, Add, Edit, w170 Password vPassword_TwentyOne
;//ANCHOR Gui Group 27
Gui, Add, groupbox, x770 y215 w180 h105
Gui, Add, Text, x775 y225, Email 27:
Gui, Add, Edit, w170 vEmail_TwentySeven
Gui, Add, Text, x775 y275, Password 27:
Gui, Add, Edit, w170 Password vPassword_TwentySeven
;//ANCHOR Gui Group 4
Gui, Add, groupbox, x10 y320 w180 h105
Gui, Add, Text, x15 y330, Email 4:
Gui, Add, Edit, w170 vEmail_Four
Gui, Add, Text, x15 y380, Password 4:
Gui, Add, Edit, w170 Password vPassword_Four
;//ANCHOR Gui Group 10
Gui, Add, groupbox, x200 y320 w180 h105
Gui, Add, Text, x205 y330, Email 10:
Gui, Add, Edit, w170 vEmail_Ten
Gui, Add, Text, x205 y380, Password 10:
Gui, Add, Edit, w170 Password vPassword_Ten
;//ANCHOR Gui Group 16
Gui, Add, groupbox, x390 y320 w180 h105
Gui, Add, Text, x395 y330, Email 16:
Gui, Add, Edit, w170 vEmail_Sixteen
Gui, Add, Text, x395 y380, Password 16:
Gui, Add, Edit, w170 Password vPassword_Sixteen
;//ANCHOR Gui Group 22
Gui, Add, groupbox, x580 y320 w180 h105
Gui, Add, Text, x585 y330, Email 22:
Gui, Add, Edit, w170 vEmail_TwentyTwo
Gui, Add, Text, x585 y380, Password 22:
Gui, Add, Edit, w170 Password vPassword_TwentyTwo
;//ANCHOR Gui Group 28
Gui, Add, groupbox, x770 y320 w180 h105
Gui, Add, Text, x775 y330, Email 28:
Gui, Add, Edit, w170 vEmail_TwentyEight
Gui, Add, Text, x775 y380, Password 28:
Gui, Add, Edit, w170 Password vPassword_TwentyEight
;//ANCHOR Gui Group 5
Gui, Add, groupbox, x10 y425 w180 h105
Gui, Add, Text, x15 y435, Email 5:
Gui, Add, Edit, w170 vEmail_Five
Gui, Add, Text, x15 y485, Password 5:
Gui, Add, Edit, w170 Password vPassword_Five
;//ANCHOR Gui Group 11
Gui, Add, groupbox, x200 y425 w180 h105
Gui, Add, Text, x205 y435, Email 11:
Gui, Add, Edit, w170 vEmail_Eleven
Gui, Add, Text, x205 y485, Password 11:
Gui, Add, Edit, w170 Password vPassword_Eleven
;//ANCHOR Gui Group 17
Gui, Add, groupbox, x390 y425 w180 h105
Gui, Add, Text, x395 y435, Email 17:
Gui, Add, Edit, w170 vEmail_Seventeen
Gui, Add, Text, x395 y485, Password 17:
Gui, Add, Edit, w170 Password vPassword_Seventeen
;//ANCHOR Gui Group 23
Gui, Add, groupbox, x580 y425 w180 h105
Gui, Add, Text, x585 y435, Email 23:
Gui, Add, Edit, w170 vEmail_TwentyThree
Gui, Add, Text, x585 y485, Password 23:
Gui, Add, Edit, w170 Password vPassword_TwentyThree
;//ANCHOR Gui Group 29
Gui, Add, groupbox, x770 y425 w180 h105
Gui, Add, Text, x775 y435, Email 29:
Gui, Add, Edit, w170 vEmail_TwentyNine
Gui, Add, Text, x775 y485, Password 29:
Gui, Add, Edit, w170 Password vPassword_TwentyNine
;//ANCHOR Gui Group 6
Gui, Add, groupbox, x10 y530 w180 h105
Gui, Add, Text, x15 y540, Email 6:
Gui, Add, Edit, w170 vEmail_Six
Gui, Add, Text, x15 y590, Password 6:
Gui, Add, Edit, w170 Password vPassword_Six
;//ANCHOR Gui Group 12
Gui, Add, groupbox, x200 y530 w180 h105
Gui, Add, Text, x205 y540, Email 12:
Gui, Add, Edit, w170 vEmail_Twelve
Gui, Add, Text, x205 y590, Password 12:
Gui, Add, Edit, w170 Password vPassword_Twelve
;//ANCHOR Gui Group 18
Gui, Add, groupbox, x390 y530 w180 h105
Gui, Add, Text, x395 y540, Email 18:
Gui, Add, Edit, w170 vEmail_Eighteen
Gui, Add, Text, x395 y590, Password 18:
Gui, Add, Edit, w170 Password vPassword_Eighteen
;//ANCHOR Gui Group 24
Gui, Add, groupbox, x580 y530 w180 h105
Gui, Add, Text, x585 y540, Email 24:
Gui, Add, Edit, w170 vEmail_TwentyFour
Gui, Add, Text, x585 y590, Password 24:
Gui, Add, Edit, w170 Password vPassword_TwentyFour
;//ANCHOR Gui Group 30
Gui, Add, groupbox, x770 y530 w180 h105
Gui, Add, Text, x775 y540, Email 30:
Gui, Add, Edit, w170 vEmail_Thirty
Gui, Add, Text, x775 y590, Password 30:
Gui, Add, Edit, w170 Password vPassword_Thirty
;//!SECTION Gui-Groups
Gui, Add, Button, x10 y640 w940 gwrite_to_file, Continue
Gui, Show, w965 h675
return
;//ANCHOR Write details to file
write_to_file:
{
numbers := ["One", "Two", "Three", "Four", "Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifthteen","Sixteen","Seventeen","Eighteen","Nineteen","Twenty","TwentyOne","TwentyTwo","TwentyThree","TwentyFour","TwentyFive","TwentySix","TwentySeven","TwentyEight","TwentyNine","Thirty"]
Gui, Submit
Gui, Destroy
loop % (numbers.MaxIndex())
{
num := numbers[A_Index]
FileAppend % Email_%num% . "`n" . Password_%num% . "`n", database.txt
}
reload ;We now have the accounts, lets get back to the program
}
return
}
;//!SECTION Create login details
;//SECTION Login functions
;//ANCHOR Window_setup
window_setup(runnum, only_once, login)
{
Check_internet_connection()
tc1 := [-7,0,975,1054]
tc2 := [-7,0,975,1054,953,0,975,1054]
tc3 := [-7,0,975,527,953,0,975,527,-7,517,1935,527]
tc4 := [-7,0,975,527,953,0,975,527,-7,517,975,527,953,517,975,527]
tc5 := [-7,0,970,355,948,0,979,355,-7,345,970,355,948,345,979,355,-7,690,970,355]
tc6 := [-7,0,970,355,948,0,979,355,-7,345,970,355,948,345,979,355,-7,690,970,355,948,690,979,355]
tc7 := [-7,0,970,355,948,0,979,355,-7,345,970,355,948,345,979,355,-7,692,655,357,633,692,655,357,1273,692,655,357]
tc8 := [-7,0,500,540,478,0,500,540,963,0,500,540,1448,0,500,540,-7,530,500,540,478,530,500,540,963,530,500,540,1448,530,500,540]
tc9 := [-7,0,655,355,633,0,655,355,1273,0,655,355,-7,347,655,355,633,347,655,355,1273,347,655,355,-7,694,655,355,633,694,655,355,1273,694,655,355]
tc10 := [-7,0,495,355,473,0,495,355,953,0,495,355,1433,0,495,355,-7,345,495,355,473,345,495,355,953,345,495,355,1433,345,495,355,-7,690,970,355,948,690,979,355]
tc11 := [-7,0,495,355,473,0,495,355,953,0,495,355,1433,0,495,355,-7,345,495,355,473,345,495,355,953,345,495,355,1433,345,495,355,-7,690,495,355,473,690,485,355,944,690,983,355]
tc12 := [-7,0,495,355,473,0,495,355,953,0,495,355,1433,0,495,355,-7,345,495,355,473,345,495,355,953,345,495,355,1433,345,495,355,-7,690,495,355,473,690,485,355,953,690,485,355,1443,690,485,355]
accountnum := login.MaxIndex()
tcnum := Round(accountnum / 2, 0)
if (only_once = 1)
{
if (runnum > 1)
{
passnum := runnum * 2
}
else
{
passnum = 1
}
Run_login_functions(login[passnum], login[(passnum + 1)])
Sleep, %normal_sleep%
WinMove, Trove,, %x%, %y%, %w%, %h%
Sleep, %normal_sleep%
WinSetTitle, Trove,, Client%runnum%
Sleep, %normal_sleep%
}
else
{
counter := 1
offset := 1
Loop, %accountnum%
{
if (Mod(A_Index, 2) = 1)
{
Run_login_functions(login[A_Index], login[A_Index+1])
Sleep, %normal_sleep%
if (counter != 1)
{
offset += 4
}
x := tc%tcnum%[offset]
y := tc%tcnum%[offset + 1]
w := tc%tcnum%[offset + 2]
h := tc%tcnum%[offset + 3]
WinMove, Trove,, %x%, %y%, %w%, %h%
Sleep, %normal_sleep%
WinSetTitle, Trove,, Client%counter%
Sleep, %normal_sleep%
counter += 1
}
}
}
Check_for_crashed_clients(accoutnum, login)
}
;//ANCHOR Run login functions
Run_login_functions(email, pass)
{
Change_account()
Set_glyph_login_name()
Compact_login_account(email, pass)
}
;//ANCHOR Set-up for login
Change_account()
{
ControlClick, x900 y20, Glyph
Sleep, %normal_sleep%
ControlSend,, {down down}{down up}, Glyph
Sleep, %normal_sleep%
ControlClick, x900 y20, Glyph
Sleep, %normal_sleep%
ControlSend,, {down down}{down up}, Glyph
Sleep, %normal_sleep%
}
;//ANCHOR Find Glyph Login windowtitle
Set_glyph_login_name()
{
glyphlogintitles := ["Glyph Login","Glyph Anmeldung","Connexion à Glyph","Вход в систему Glyph","Inicio de sesión de Glyph","Login da Glyph","Glyph 로그인","登录 Glyph"]
loop ;Keep checking until window is found
{
for x, item in glyphlogintitles
{
if (WinExist(glyphlogintitles[x]))
{
global glyphloginname := glyphlogintitles[x]
break 2
}
}
Sleep, 1000
}
}
;//ANCHOR Log account into Glyph
Compact_login_account(email, pass)
{
;//NOTE Clears login information
loop 3
{
ControlClick, x155 y253, %glyphloginname%
Sleep, %normal_sleep%
}
Send_from_clipboard(email)
ControlClick, x147 y322, %glyphloginname%
Sleep, %normal_sleep%
Send_from_clipboard(pass)
ControlSend,, {enter down}{enter up}, %glyphloginname%
WinWaitNotActive, %glyphloginname%,, 2 ;login complete
if (ErrorLevel)
{
Compact_login_account(email, pass)
}
ControlClick, x430 y530, Glyph
Sleep, %wait_for_trove_to_open%
loop
{
Sleep, %normal_sleep%
if !(WinExist("Trove"))
{
ControlClick, x430 y530, Glyph
Sleep, 1000
}
else
{
break
}
}
Sleep, %normal_sleep%
}
;//ANCHOR Check for crashed clients
Check_for_crashed_clients(emailnum, login)
{
loop %emailnum%
{
client_name := "Client" . A_Index
if !WinExist(client_name)
{
window_setup(A_Index, 1, login)
}
}
}
;//ANCHOR Check for internet connectivity to stop failed logins continuing to fail
Check_internet_connection()
{
if (DllCall("Wininet.dll\InternetGetConnectedState", "Str", 0x40,"Int",0)) = 0
{
loop
{
if (DllCall("Wininet.dll\InternetGetConnectedState", "Str", 0x40,"Int",0)) = 0
{
Run, %autohotkey_directory% Error_Display.ahk 2
;//NOTE Sub-loop to wait for reconnection to internet
loop
{
if (DllCall("Wininet.dll\InternetGetConnectedState", "Str", 0x40,"Int",0)) = 1
{
break
}
Sleep, %normal_sleep%
if !WinExist("Error_Display.ahk")
{
Run, %autohotkey_directory% Error_Display.ahk 3
Sleep, 1000
}
}
}
else
{
DetectHiddenWindows, On ;So that we can find Error_Display.ahk in the tray
WinClose, Error_Display.ahk ahk_class AutoHotkey
DetectHiddenWindows, Off ;If DetectHiddenWindows is left on, it breaks the rest of the script due to multiple similar hidden window names in use
break
}
Sleep, 1000
}
}
}
;//ANCHOR Send login details with clipboard
Send_from_clipboard(stuff_to_save)
{
clipboard = %stuff_to_save%
ControlSend,, ^v, %glyphloginname%,
clipboard = ` ;clear clipboard
}
;//ANCHOR Check for dashboard on trove launch
Check_for_pop_up_on_lauch(x)
{
WinGetPos, , , w, h, Client%x%
w_one := w//1.9
w_two := w//18
h_one := h//8.3
h_two := h//19
x := w_one - w_two
y := h_one + h_two
PixelGetColor, col, %x%, %y%, RGB
;if col1 = "0x000000"
return col
}
;//!SECTION Login Functions
;//SECTION Exit script
;//ANCHOR DoBeforeExit
class exitclass
{
DoBeforeExit()
{
Send, {Shift} ;Incase a shift-down-up was interrupted
Send, {CTRL} ;Incase a ctrl-down-up was interrupted
}
}
;//ANCHOR Exit Script
$*F4::ExitApp
;//!SECTION Exit script