-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBetterDiscordAutoInstaller.ahk
More file actions
54 lines (41 loc) · 972 Bytes
/
BetterDiscordAutoInstaller.ahk
File metadata and controls
54 lines (41 loc) · 972 Bytes
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
#Requires AutoHotkey v2.0
SetTitleMatchMode(2)
windowName := "BetterDiscord Installer"
; Run BetterDiscord installer
Run A_Desktop "\..\Downloads\BetterDiscord-Windows.exe"
; Wait for the installer window to appear
WinWait windowName, , 10
if !WinExist(windowName) {
MsgBox "BetterDiscord installer window not found!"
ExitApp
}
; Focus the window
WinActivate windowName
WinWaitActive windowName, , 5
; Wait for the installer to load
Sleep 3000
; Step 1: Click license agreement checkbox
Click 30, 285
Sleep 500
; Click Next button
Click 505, 315
Sleep 1500
; Step 2: Click Next again
Click 505, 315
Sleep 1500
; Step 3: Click installation option
Click 245, 100
Sleep 500
; Click Install button
Click 505, 315
Sleep 5000
; Step 4: Keep clicking Close button until window closes
maxAttempts := 100
attempts := 0
while WinExist(windowName) && (attempts < maxAttempts) {
WinActivate windowName
Click 500, 315
Sleep 250
attempts++
}
ExitApp