-
Notifications
You must be signed in to change notification settings - Fork 5
/
Key Recorder.ahk
169 lines (137 loc) · 2.57 KB
/
Key Recorder.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
#SingleInstance Force
SetBatchLines, -1
F1::
ToolTip, Gravação iniciada...
replayLigado := true
fimGravacao := true
fimTecla := false
teclas := []
SetTimer, key, 0
return
key:
Input, tecla, V L1, {Space}{BackSpace}{Tab}{Enter}{Delete}
envia := InStr(ErrorLevel, "EndKey") ? RegExReplace(ErrorLevel, "EndKey:(.*)", "$1") : tecla
if (!fimTecla)
{
ToolTip % envia
teclas.Push("{" . envia . "}")
}
return
#if fimGravacao = true
F2::
fimTecla := true
fimGravacao = false
MsgBox, 64, Sucesso, Gravação concluída!
SetTimer, key, Off
ToolTip
return
#if replayLigado = true
F3::
InputBox, repeticao, Replay, Número de repetições,, 200, 130
if (!ErrorLevel)
{
if repeticao is Integer
{
ToolTip, Reproduzindo gravação...
Loop % repeticao
{
Loop % teclas.Length()
{
Send % teclas[A_Index]
;Sleep, 100
}
}
}
else
{
Loop % teclas.Length()
{
Send % teclas[A_Index]
;Sleep, 100
}
}
}
ToolTip
return
#if fimGravacao = true
~$Home::
ToolTip, Home
teclas.Push("{Home}")
return
~$End::
ToolTip, End
teclas.Push("{End}")
return
~$Up::
ToolTip, Up
teclas.Push("{Up}")
return
~$Down::
ToolTip, Down
teclas.Push("{Down}")
return
~$Left::
ToolTip, Left
teclas.Push("{Left}")
return
~$Right::
ToolTip, Right
teclas.Push("{Right}")
return
~Shift & ~Up::
ToolTip, Shift + Up
teclas.Push("{Shift Down}{Up}{ShiftUp}")
return
~Shift & ~Down::
ToolTip, Shift + Down
teclas.Push("{Shift Down}{Down}{ShiftUp}")
return
~+~Left::
ToolTip, Shift + Left
teclas.Push("{Shift Down}{Left}{Shift Up}")
return
~+~Right::
ToolTip, Shift + Right
teclas.Push("{Shift Down}{Right}{Shift Up}")
return
~Ctrl & ~a::
ToolTip, Ctrl + A
teclas.Push("{Ctrl Down}{a}{Ctrl Up}")
return
~Ctrl & ~c::
ToolTip, Ctrl + C
teclas.Push("{Ctrl Down}{c}{Ctrl Up}")
return
~Ctrl & ~v::
ToolTip, Ctrl + V
teclas.Push("{Ctrl Down}{v}{Ctrl Up}")
return
~Ctrl & ~x::
ToolTip, Ctrl + X
teclas.Push("{Ctrl Down}{x}{Ctrl Up}")
return
~^~Left::
ToolTip, Ctrl + Left
teclas.Push("{Ctrl Down}{Left}{Ctrl Up}")
return
~^~Right::
ToolTip, Ctrl + Right
teclas.Push("{Ctrl Down}{Right}{Ctrl Up}")
return
#if fimGravacao = true && GetKeyState("Ctrl", "P") && GetKeyState("Shift", "P")
~$*Left::
ToolTip, Ctrl + Shift + Left
teclas.Push("{Ctrl Down}{Shift Down}{Left}{Ctrl Up}{Shift Up}")
return
~$*Right::
ToolTip, Ctrl + Shift + Right
teclas.Push("{Ctrl Down}{Shift Down}{Right}{Ctrl Up}{Shift Up}")
return
~$*Home::
ToolTip, Ctrl + Shift + Home
teclas.Push("{Ctrl Down}{Shift Down}{Home}{Ctrl Up}{Shift Up}")
return
~$*End::
ToolTip, Ctrl + Shift + End
teclas.Push("{Ctrl Down}{Shift Down}{End}{Ctrl Up}{Shift Up}")
return