-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathauto-hot-key.ahk
310 lines (270 loc) · 5.36 KB
/
auto-hot-key.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
#Persistent
#keyhistory
;KeyHistory
#noenv
#singleinstance force
#installmousehook
#installkeybdhook
setbatchlines -1
listlines off
sendmode input
setworkingdir %a_scriptdir%
CoordMode, Mouse, Screen
#o::suspend
insert::f14
delete::f15
home::f16
end::f17
pgup::f18
pgdn::f19
left::f20
up::f21
down::f22
right::f23
!#m::f24
f15::
send #^v
sleep 400
send {enter}
send {esc}
return
f16::
send #^v
sleep 400
send {down}
sleep 400
send {enter}
send {esc}
return
f17::
send #^v
sleep 400
send {down}
sleep 400
send {down}
sleep 400
send {enter}
send {esc}
return
#wheeldown::volume_up
#wheelup::volume_down
^f14::
DllCall("PowrProf\SetSuspendState", "Int", 0, "Int", 0, "Int", 0)
return
^f15::
Run, shutdown.exe /r /t 0
Return
^f16::
Run, shutdown /s /t 0
Return
sc056::rcontrol
appskey::rcontrol
#include, %a_scriptdir%\lib\timelineclick.ahk
;#include, %a_scriptdir%\lib\snippets.ahk
#ifwinactive, ahk_exe onecommander.exe
!s::send ^{tab}
!w::send ^+{tab}
f1::
send {mbutton}
sleep 50
send ^+c
sleep 50
send #4
sleep 50
send ^+t
sleep 150
send useby
sleep 200
send {enter}
sleep 50
return
#ifwinactive
#ifwinactive, ahk_exe resolve.exe
f13:: ;change hotkey to desired hotkey
timelineclick(["\imagesearch\resolve\editpage.png", "\imagesearch\resolve\fairlight.png", "\imagesearch\resolve\cutpage.png"], [70,63,45])
return
`; & d::
send +v
send {del}
return
`; & j::
send +v
send ^+,
return
`; & l::
send +v
send ^+.
return
`; & 3::
send m
send {esc}
send {del}
return
`;::send {;}
+`;::send +{;}
!`;::send !{;}
#`;::send #{;}
#ifwinactive
#ifwinactive ahk_exe chrome.exe
f1::^+t
f2::^w
f3::
send ^c
sleep 50
send ^t
sleep 50
send ^v
send {enter}
return
f4::
send ^c
sleep 50
send ^t
sleep 50
send y{space}
send ^v
sleep 50
send {enter}
return
^o::^+a
f13::^+a
!w::send ^{pgup}
!s::send ^{pgdn}
space & a::send {browser_back}
space & s::send {Browser_forward}
#ifwinactive
#ifwinactive ahk_exe windowsterminal.exe
f3::^+t
f2::^+w
!w::send ^{pgup}
!s::send ^{pgdn}
f13 & l::send !{right}
f13 & h::send !{left}
f13 & j::send !{down}
f13 & k::send !{up}
f13::^+t
#ifwinactive
#ifwinactive ahk_exe obsidian.exe
f1::+1
f13::p
#ifwinactive
movingwindowtootherdisplay() {
send #+{left}
sysget, monitors, monitorcount
sysget, monitorcount, monitorcount
sysget, monitorprimary, monitorprimary
current := 0
loop, %monitorcount%
{
sysget, monitor, monitor, %a_index%
coordmode, mouse, screen
mousegetpos, mousex, mousey
if ( (mousex >= monitorleft) && (mousex < monitorright) && (mousey >= monitortop) && (mousey < monitorbottom) )
{
current := a_index
currentrx := (mousex - monitorleft) / (monitorright - monitorleft)
currentry := (mousey - monitortop) / (monitorbottom - monitortop)
break
}
}
next := current + 1
if (next > monitorcount)
next := 1
sysget, monitor, monitor, %next%
newx := monitorleft + currentrx*(monitorright - monitorleft)
newy := monitortop + currentry*(monitorbottom - monitortop)
dllcall("setcursorpos", "int", newx, "int", newy)
dllcall("setcursorpos", "int", newx, "int", newy)
}
JumpCursorBetweenMonitors() {
MouseGetPos, MouseX, MouseY ; Get current mouse position
SysGet, MonitorCount, MonitorCount ; Get number of monitors
if (MonitorCount < 2) {
MsgBox, You need at least two monitors for this script to work.
return
}
; Get dimensions of both monitors
SysGet, M1, Monitor, 1
SysGet, M2, Monitor, 2
; Determine which monitor the mouse is currently on
if (MouseX >= M1Left && MouseX <= M1Right && MouseY >= M1Top && MouseY <= M1Bottom) {
; Move to monitor 2
NewX := MouseX - M1Left + M2Left
NewY := MouseY - M1Top + M2Top
MouseMove, NewX, NewY
} else {
; Move to monitor 1
NewX := MouseX - M2Left + M1Left
NewY := MouseY - M2Top + M1Top
MouseMove, NewX, NewY
}
}
togglemaxwindow()
{
winget, winstate, minmax, a
if (winstate = 1)
{
winrestore, a
}
else
{
winmaximize, a
}
}
tab & e::run, "c:\users\master\editing\projects\"
tab & w::run, "c:\users\master\downloads\"
tab & r::run, "e:\render\"
tab & t::run, "C:\Users\master\Pictures"
tab & 2::run, "e:\obs\"
tab & 3::run, "E:\phone\Camera\Camera"
tab::tab
space & ,::pgup
space & [::send !{left}
space & ]::send !{right}
space & d::bs
space & h::left
space & i::home
space & j::down
space & k::up
space & l::right
space & m::pgdn
space & n::^t
space & o::end
space & p::send ^{pgdn}
space & u::send ^{pgup}
space & v::send !+^v
space & x::del
space & z::^z
space & g::#tab
space & e::up
space & q::left
space & r::right
space & w::down
space & +::volume_up
space & -::volume_down
space & `::home
space & tab::
send {mbutton}
send !{f4}
return
space & f13::
movingwindowtootherdisplay()
JumpCursorBetweenMonitors()
return
space & 1::send ^#1
space & 2::send ^#2
space & 3::send ^#3
space & 4::send ^#4
space & 5::send ^#5
space & f1::send #^6
space & f2::send #^7
space & f3::send #^8
space & f4::send #^9
space & f5::send #^0
Space & f6::send #+s
space & f9::reload
space::send {space}
+space::send +{space}
!space::send !{space}
#space::send #{space}
^space::send ^{space}