-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathterraria-notes-harp.ahk
129 lines (99 loc) · 1.35 KB
/
terraria-notes-harp.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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
MoveToNote(ByRef button)
{
direction := 1 ; 1, -1
two_blocks_pixels := 32
invert := "NO" ; YES, NO
WinGetPos, myWinX, myWinY, myWinSizeX, myWinSizeY, A
if(invert == "NO")
MouseMove, (myWinSizeX/2 + (direction) * (two_blocks_pixels * button) ), (myWinSizeY/2)
if(invert == "YES")
MouseMove, (myWinSizeX/2 + (direction) * (two_blocks_pixels * (12 - button)) ), (myWinSizeY/2)
}
PlayNote()
{
send, {LButton down}
sleep, 100
send, {LButton up}
}
`::
{
MoveToNote(0)
PlayNote()
return
}
1::
{
MoveToNote(1)
PlayNote()
return
}
2::
{
MoveToNote(2)
PlayNote()
return
}
3::
{
MoveToNote(3)
PlayNote()
return
}
4::
{
MoveToNote(4)
PlayNote()
return
}
5::
{
MoveToNote(5)
PlayNote()
return
}
6::
{
MoveToNote(6)
PlayNote()
return
}
7::
{
MoveToNote(7)
PlayNote()
return
}
8::
{
MoveToNote(8)
PlayNote()
return
}
9::
{
MoveToNote(9)
PlayNote()
return
}
0::
{
MoveToNote(10)
PlayNote()
return
}
-::
{
MoveToNote(11)
PlayNote()
return
}
=::
{
MoveToNote(12)
PlayNote()
return
}