-
Notifications
You must be signed in to change notification settings - Fork 0
/
cs.ahk
72 lines (60 loc) · 1.4 KB
/
cs.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
PlayCounterStrike() {
Process, Exist, cs2.exe
If ErrorLevel {
Exit
}
Before()
Run, "C:/Program Files (x86)/Steam/steam.exe" steam://run/730
WinWait, Counter-Strike 2
WinWaitClose
After()
}
Before() {
Run, mullvad disconnect
CloseStuff()
OpenSteam()
OpenVibranceGui()
Hotkey LWin, DoNothing
}
After() {
Hotkey LWin, Off
CloseSteam()
CloseVibranceGui()
ReopenStuff()
Send, !+{F10}
}
CloseStuff() {
Process, Close, chrome.exe
Process, Close, firefox.exe
Process, Close, idea64.exe
Process, Close, transmission-qt.exe
}
OpenSteam() {
Process, Exist, steam.exe
If Not ErrorLevel {
Run, "C:/Program Files (x86)/Steam/steam.exe" -silent
Loop {
Sleep, 1000
RegRead, ActiveUser, HKEY_CURRENT_USER\SOFTWARE\Valve\Steam\ActiveProcess, ActiveUser
} Until ActiveUser != 0
}
}
OpenVibranceGui() {
Process, Exist, vibranceGUI.exe
If Not ErrorLevel {
Run, "C:/Program Files (x86)/vibranceGUI_nvidia_only/vibranceGUI.exe"
}
}
CloseSteam() {
Process, Close, steam.exe
RegWrite, REG_DWORD, HKEY_CURRENT_USER\SOFTWARE\Valve\Steam\ActiveProcess, ActiveUser
RegWrite, REG_DWORD, HKEY_CURRENT_USER\SOFTWARE\Valve\Steam\ActiveProcess, pid
}
CloseVibranceGUI() {
Sleep, 2000
Process, Close, vibranceGUI.exe
}
ReopenStuff() {
; TODO
}
DoNothing: