-
Notifications
You must be signed in to change notification settings - Fork 0
/
tryndaLaugh.ahk
49 lines (44 loc) · 1.06 KB
/
tryndaLaugh.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
#InstallKeybdHook
#UseHook
#SingleInstance, Force
#NoEnv
;Menu, Tray, NoIcon ; I personally like to have the ability to show/hide tray icon.
SavedDataFile := "TryndLaugh.dat"
xE = 0
yE = 0
IfExist, %SavedDataFile%
FileReadLine, pixCol, %SavedDataFile%, 1
return
#IfWinActive ahk_exe League of Legends.exe
numpad0::
WinGetActiveStats, Title, w, h, x, y
xE := ((48/100)*w)
yE := ((935/1000)*h)
PixelGetColor, pixCol, %xE%, %yE%
FileDelete, %SavedDataFile%
FileAppend, %pixCol%, %SavedDataFile%
msgbox, Your Tryndamere Macro is now ready! If it does not work, make sure you are in borderless
return
~e::
PixelGetColor, currentCol, %xE%, %yE%
if ErrorLevel != 0
Return
else if (currentCol == pixCol)
{
sleep 40
send ^{4 down}
sleep 10
send ^{4 up}
}
return
; I personally like to have the ability to show/hide tray icon.
/*
#IfWinActive
#enter::
hidStatus = %A_IconHidden%
if (hidStatus = 0)
Menu, Tray, NoIcon
else if (hidStatus = 1)
Menu, Tray, Icon
return
*/