-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathChampions_Of_Anteria.ahk
317 lines (286 loc) · 4.84 KB
/
Champions_Of_Anteria.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
#SingleInstance force
#Persistent
{
Layer := 1
CapsLock_pressed := 0
SC029_pressed := 0
Tab_pressed := 0
XButton2_pressed := 0
XButton1_pressed := 0
F13_pressed := 0
a_pressed := 0
e_pressed := 0
r_pressed := 0
f_pressed := 0
w_pressed := 0
x_pressed := 0
c_pressed := 0
v_pressed := 0
LAlt_pressed := 0
}
SetCapsLockState, AlwaysOff
SetScrollLockState, AlwaysOff
Process, Priority, , A
SetTitleMatchMode, 2
;#InstallKeybdHook
;#InstallMouseHook
CoordMode, mouse, Screen
{ ; Monitoring Windows
BlockInput, On
KeyHistory
WinGetActiveTitle, Title
WinWait, %Title%
SetKeyDelay 10, 32
Send {Lwin down}{Right}{Right}{Right}{Right}{Lwin up}{LControl down}{k}{LControl Up}
#IfWinExist Event Tester
{
WinClose Event Tester
Run, C:\Program Files (x86)\Thrustmaster\TARGET\Tools\EventTester.exe
WinWait, Event Tester
SetKeyDelay 10, 32
Send {Lwin down}{Right}{Right}{Lwin up}{esc}{esc}{esc}{esc}
Sleep 100
MouseClick, left, 1950, 70
MouseClick, left, 2016, 95
BlockInput, Off
return
}
#IfWinExist
}
{ ; AutoHotKey Script option.
#F3::Suspend, Toggle
#F4::ExitApp
;^SPACE:: Winset, Alwaysontop, , A ; Toggle Active Windows Always on Top.
/* ; Lock mouse to Window. LControl+LAlt+A. LControl+LAlt+S.
{ ; Lock mouse to Window. LControl+LAlt+A. LControl+LAlt+S.
^!a::
LockMouseToWindow("Settlers 7 Window")
Return
^!s::
LockMouseToWindow()
Return
LockMouseToWindow(llwindowname="")
{
VarSetCapacity(llrectA, 16)
WinGetPos, llX, llY, llWidth, llHeight, %llwindowname%
If (!llWidth AND !llHeight) {
DllCall("ClipCursor")
Return, False
}
Loop, 4 {
DllCall("RtlFillMemory", UInt,&llrectA+0+A_Index-1, UInt,1, UChar,llX >> 8*A_Index-8)
DllCall("RtlFillMemory", UInt,&llrectA+4+A_Index-1, UInt,1, UChar,llY >> 8*A_Index-8)
DllCall("RtlFillMemory", UInt,&llrectA+8+A_Index-1, UInt,1, UChar,(llWidth + llX)>> 8*A_Index-8)
DllCall("RtlFillMemory", UInt,&llrectA+12+A_Index-1, UInt,1, UChar,(llHeight + llY) >> 8*A_Index-8)
}
DllCall("ClipCursor", "UInt", &llrectA)
Return, True
}
}
*/
{ ; FullScreen Window.
^!f::
WinGetTitle, currentWindow, A
IfWinExist %currentWindow%
{
WinSet, Style, ^0xC00000 ; toggle title bar
WinMove, , , 0, 0, 1920, 1080
}
return
}
} ; End of AutoHotKey Script option.
{ ;Testing
/*; Pixel color as as condition
{ ; Pixel color as as condition
!#z::
PixelGetColor, color, 1889, 95
MsgBox The color at X1889 Y95 is %color%.
Clipboard = %color%
return
{ ; Numpad1
Numpad9::
PixelGetColor, color, 1889, 95
if color = 0x213A70
{
MouseGetPos, xpos, ypos
BlockInput, On
MouseClick, left, 1732, 171
MouseMove, xpos, ypos
BlockInput, Off
return
}
Else
{
MouseGetPos, xpos, ypos
BlockInput, On
SetKeyDelay 32, 32
Send {NumpadEnter}
MouseClick, left, 1732, 171
MouseMove, xpos, ypos
BlockInput, Off
}
Return
}
}
*/
}
{ ; Layer modifier. Press and hold to get into Layer 2. Release to come back to Layer 1.
CapsLock:: ;Key disabled by "SetCapsLockState, AlwaysOff".
{
If (CapsLock_pressed)
Return
CapsLock_pressed := 1
Layer := 2
Return
}
CapsLock Up::
{
CapsLock_pressed := 0
Layer := 1
Return
}
}
#IfWinActive Champions Of Anteria
Down:: ; Pause Spam
{
SetkeyDelay 32
Loop
{
Send {Down}
Sleep 32
If (GetKeyState("Down","P")=0)
Break
}
Return
}
LAlt:: ; Pause
{
If (LAlt_pressed)
Return
LAlt_pressed := 1
Send {Space}
Return
}
LAlt Up:: ; Pause
{
LAlt_pressed := 0
Send {Space}
Return
}
#IfWinActive
WheelUp::
{
If (Layer=1) and GetKeyState("MButton")
{
SetkeyDelay, 0, 32
Send {Home}
Return
}
Else if (Layer=2)
{
SetkeyDelay, 0, 32
Send {PgUp}
Return
}
Else
{
Send {WheelUp}
Return
}
}
WheelDown::
{
If (Layer=1) and GetKeyState("MButton")
{
SetkeyDelay, 0, 32
Send {End}
Return
}
Else if (Layer=2)
{
SetkeyDelay, 0, 32
Send {PgDn}
Return
}
Else
{
Send {WheelDown}
Return
}
}
$SC029::
{
If (SC029_pressed)
Return
SC029_pressed := 1
If (Layer=1)
{
SendInput {esc Down}
}
If (Layer=2)
{
SendInput {SC029 Down}
}
Return
}
$SC029 Up::
{
SC029_pressed := 0
If (Layer=1)
{
If (GetKeyState("SC029"))
{
SendInput {SC029 Up}
}
Else
SendInput {esc Up}
}
If (Layer=2)
{
If (GetKeyState("esc"))
{
SendInput {esc Up}
}
Else
SendInput {SC029 Up}
}
Return
}
$Tab::
{
If (Tab_pressed)
Return
Tab_pressed := 1
If (Layer=1)
{
SendInput {Tab Down}
}
If (Layer=2)
{
SendInput {esc Down}
}
Return
}
$Tab Up::
{
Tab_pressed := 0
If (Layer=1)
{
If (GetKeyState("esc"))
{
SendInput {esc Up}
}
Else
SendInput {Tab Up}
}
If (Layer=2)
{
If (GetKeyState("Tab"))
{
SendInput {Tab Up}
}
Else
SendInput {esc Up}
}
Return
}