-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmacropad.ahk
243 lines (189 loc) · 3.45 KB
/
macropad.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
#NoEnv
#Warn
SendMode Input
SetWorkingDir %A_ScriptDir%
profile := 1
profiles := {}
profiles[1] := "Audio"
profiles[2] := "Tasks"
profiles[3] := "Websites"
profiles[4] := "Hotswap"
ShowTooltip(profiles[profile] . "")
~ScrollLock::
SetNumLockState, AlwaysOn
return
#If (!GetKeyState("ScrollLock", "T"))
Numpad1::
Send, {Numpad1}
return
Numpad2::
Send, {Numpad2}
return
Numpad3::
Send, {Numpad3}
return
Numpad4::
Send, {Numpad4}
return
Numpad5::
Send, {Numpad5}c
return
Numpad6::
Send, {Numpad6}
return
Numpad7::
Send, {Numpad7}
return
Numpad8::
Send, {Numpad8}
return
Numpad9::
Send, {Numpad9}
return
Numpad0::
Send, {Numpad0}
return
NumpadAdd::
Send, {NumpadAdd}
return
NumpadSub::
Send, {NumpadSub}
return
#If
#If (GetKeyState("ScrollLock", "T"))
NumpadAdd::
profile++
if (profile > 4)
profile := 1
ShowTooltip(profiles[profile] . "")
return
NumpadSub::
profile--
if (profile < 1)
profile := 4
ShowTooltip(profiles[profile] . "")
return
#If (profile = 1)
Numpad5::
send {Media_Play_Pause}
return
Numpad4::
send {Media_Prev}
return
Numpad6::
send {Media_Next}
return
Numpad8::
send {Volume_Up}
return
Numpad2::
send {Volume_Down}
return
Numpad0::
send {Volume_Mute}
return
#If
#If (profile = 2)
Numpad1::
IfWinExist, ahk_exe discord.exe
WinActivate
else
Run, "C:\Users\butte\AppData\Local\Discord\Update.exe --processStart Discord.exe"
return
Numpad2::
IfWinExist, ahk_exe opera.exe
WinActivate
else
Run, "C:\Users\butte\AppData\Local\Programs\Opera GX\launcher.exe"
return
Numpad3::
IfWinExist, ahk_exe steam.exe
WinActivate
else
Run, "C:\Program Files (x86)\Steam\steam.exe"
return
Numpad4::
IfWinExist, ahk_exe spotify.exe
WinActivate
else
Run, "C:\Users\butte\AppData\Roaming\Spotify\Spotify.exe"
return
Numpad5::
IfWinExist, ahk_exe taskmgr.exe
WinActivate
else
Run, taskmgr
return
Numpad6::
SetTitleMatchMode, 2
IfWinExist, ahk_class CabinetWClass
WinActivate
else
Run, explorer
return
Numpad7::
IfWinExist, ahk_exe voicemeeter.exe
WinActivate
else
Run, "C:\Program Files (x86)\VB\Voicemeeter\voicemeeter8x64.exe"
return
#If
#If (profile = 3)
Numpad1::
Run, https://www.youtube.com
return
Numpad2::
Run, https://www.google.com
return
Numpad3::
Run, aniwave.to/home
return
Numpad4::
Run, https://www.tv88.to
return
Numpad5::
Run, https://www.discord.com
return
Numpad6::
Run, https://www.github.com
return
Numpad7::
Run, https://www.twitch.tv
return
Numpad8::
Run, https://www.kick.com
return
Numpad0::
Run, https://chat.openai.com/
return
#If
#If (profile = 4)
Numpad4::
WinGetActiveStats, Title, Width, Height, X, Y
NewX := X - A_ScreenWidth
WinMove, %Title%,, %NewX%, %Y%
return
Numpad6::
WinGetActiveStats, Title, Width, Height, X, Y
NewX := X + A_ScreenWidth
WinMove, %Title%,, %NewX%, %Y%
return
Numpad8::
WinGetActiveStats, Title, Width, Height, X, Y
NewY := Y - A_ScreenHeight
WinMove, %Title%,, %X%, %NewY%
return
Numpad2::
WinGetActiveStats, Title, Width, Height, X, Y
NewY := Y + A_ScreenHeight
WinMove, %Title%,, %X%, %NewY%
return
#If
ShowTooltip(message) {
ToolTip, %message%
SetTimer, HideTooltip, -1000
}
HideTooltip:
ToolTip
SetTimer, HideTooltip, Off
return