-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMain Script.ahk
364 lines (326 loc) · 13.4 KB
/
Main Script.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
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
;Variables
timeline1 = 0x202020 ;Timeline Colour
timeline2 = 0x313131 ;Timeline Colour
timeline3 = 0x1B1B1B ;Timeline Colour
timeline4 = 0x414141 ;Timeline Colour
timeline5 = 0x212121 ;Timeline Colour
timeline6 = 0x262626 ;Timeline Colour
class1 = Edit1 ;Text Box Class
class2 = Edit3 ;Text Box Class
class3 = Edit2 ;Text Box Class
class4 = DroverLord - Window Class21 ;Text Box Class
class5 = Edit4 ;Text Box Class
class6 = Edit8 ;Text Box Class
F1::
IfWinNotExist, ahk_class Premiere Pro
Run, Adobe Premiere Pro.exe
WinActivate ahk_class Premiere Pro
return
;Focus on Premiere window.
;DONE
F2::
IfWinNotExist ahk_class Photoshop
Run Photoshop.exe
WinActivate ahk_class Photoshop
return
;Focus on Photoshop window.
;DONE
F3::
IfWinNotExist ahk_class Adobe Audition CC.exe
Run Adobe Audition CC.exe
WinActivate ahk_class Adobe Audition CC.exe
return
;Focus on Audition window.
;DONE
F4::
IfWinNotExist ahk_class Clover_WidgetWin_0
Run Clover.exe
WinActivate ahk_class Clover_WidgetWin_0
return
;Focus on Clover (Explorer) window.
;DONE
F5::
WinActivate ahk_class Chrome_WidgetWin_1
return
;Focus on Firefox window.
;DONE
#MaxHotkeysPerInterval 1000
#Include RapidHotKey.ahk
#IfWinActive ahk_exe Adobe Premiere Pro.exe
;ANYTHING BELOW THIS POINT WILL ONLY WORK INSIDE OF PREMIERE PRO
;Common modifier keys used in AHK:
; Alt = !
; Shift = +
; Ctrl = ^
; Windows Key = #
;TIMELINE HOTKEYS
q::Send {NumpadMult}{NumpadDiv}
;Ripple delete clip at playhead.
;DONE
!q::Send {NumpadMult}e
;Delete clip at playhead.
;DONE
^+1::Send, ^+g-8{Enter}
;Default audio gain adjustment for intro.
;DONE
v::Send b100.1{Enter}
;Change clip speed to 100.1%.
;DONE
c::Send b200{Enter}
;Change clip speed to 200%.
;DONE
z::
BlockInput, SendAndMouse ;---------------------------Sets the inputs to block (Mouse and Keyboard)
BlockInput On ;--------------------------------------Blocks user input defined by the previous statement
SetKeyDelay, 0 ;-------------------------------------Sets delay between keypresses as variable 0
MouseGetPos, xpos, ypos ;----------------------------Obtains current mouse position and stores it as variable xpos and variable ypos (x and y coordinates)
CoordMode, Mouse, Screen
GoSub, +3 ;------------------------------------------Calls upon the Title Selector hotkey
MouseMove, 1113, 152, 0 ;--------Moves cursor to position x,y
MouseClick, Left, , , 1 ;----------------------------Left clicks the mouse once at selected point
MouseMove, 110, 209, 0 ;---------Moves cursor to position x,y
MouseClick, Left, , , 1 ;----------------------------Left clicks the mouse once at selected point
Send, ^+{/} ;----------------------------------------Sends keyboard shortcut bound in Premiere to duplicating a clip
MouseMove, xpos, ypos, 0 ;------Moves cursor back to original position xpos, ypos
BlockInput, Off ;------------------------------------Re-enables input from user
return
;Title Creator
;DONE
;PANEL NAVIGATION/SHORTCUTS
+1::
;CoordMode, Mouse, Screen
BlockInput, SendAndMouse ;---------------------------Selects the inputs to block.
BlockInput, On ;-------------------------------------Blocks input from the user.
SetKeyDelay, 0 ;-------------------------------------Makes key presses have 0 delay.
MouseGetPos, xpos, ypos ;----------------------------Stores current co-ordinates of mouse position as variables x and y.
MouseMove, 16, 732, 0 ;------------------------------Moves cursor to effects panel.
MouseClick, Left, , , 1 ;----------------------------Selects the effects panel.
Send, {BackSpace} ;----------------------------------Deletes text in textbox
MouseMove, xpos, ypos, 0 ;---------------------------Sends mouse back to original co-ordinates.
Suspend, On ;----------------------------------------Suspends the script to prevent problems with hotkey activation
return
;Highlights the effects panel and clears text in the search bar.
;DONE
+2::
CoordMode, Mouse, Screen
BlockInput, SendAndMouse ;---------------------------Selects the inputs to block.
BlockInput, On ;-------------------------------------Blocks input from the user.
SetKeyDelay, 0 ;-------------------------------------Makes key presses have 0 delay.
MouseGetPos, xpos, ypos ;----------------------------Stores current co-ordinates of mouse position as variables x and y.
MouseMove, 69, 69, 0 ;-------------------------------Moves cursor to Commonly Used Bin.
MouseClick, Left, , , 1 ;----------------------------Selects the Commonly Used Bin.
MouseMove, xpos, ypos, 0 ;---------------------------Sends mouse back to original co-ordinates.
return
;Selects the Commonly Used bin.
;DONE
+3::
CoordMode, Mouse, Screen
BlockInput, SendAndMouse ;---------------------------Selects the inputs to block.
BlockInput, On ;-------------------------------------Blocks input from the user.
SetKeyDelay, 0 ;-------------------------------------Makes key presses have 0 delay.
MouseGetPos, xpos, ypos ;----------------------------Stores current co-ordinates of mouse position as variables x and y.
MouseMove, 209, 69, 0 ;------------------------------Moves cursor to Text Bin.
MouseClick, Left, , , 1 ;----------------------------Selects the Commonly Used Bin.
MouseMove, xpos, ypos, 0 ;---------------------------Sends mouse back to original co-ordinates.
return
;Selects the Text bin.
;DONE
+4::
CoordMode, Mouse, Screen
BlockInput, SendAndMouse ;---------------------------Selects the inputs to block.
BlockInput, On ;-------------------------------------Blocks input from the user.
SetKeyDelay, 0 ;-------------------------------------Makes key presses have 0 delay.
MouseGetPos, xpos, ypos ;----------------------------Stores current co-ordinates of mouse position as variables x and y.
MouseMove, 337, 69, 0 ;------------------------------Moves cursor to Text Bin.
MouseClick, Left, , , 1 ;----------------------------Selects the Commonly Used Bin.
MouseMove, xpos, ypos, 0 ;---------------------------Sends mouse back to original co-ordinates.
return
;Selects the Secondary Timeline.
;DONE
;APPLYING EFFECTS
u::
BlockInput, SendAndMouse ;---------------------------Selects the inputs to block.
BlockInput, On ;-------------------------------------Blocks input fro the user.
SetKeyDelay, 0 ;-------------------------------------Makes key presses have 0 delay.
MouseGetPos, xpos, ypos ;----------------------------Stores current co-ordinates of mouse position as variables x and y.
MouseMove, 16, 732, 0 ;------------------------------Moves cursor to effects panel.
MouseClick, Left, , , 1 ;----------------------------Selects the effects panel.
Send, {BackSpace} ;----------------------------------Deletes text in textbox
Send, crop ;-----------------------------------------Searches for the crop effect.
MouseMove, 94, 880, 0 ;------------------------------Moves cursor ontop of the crop effect.
MouseClick, Left, , , 2 ;----------------------------Double left clicks to apply to the clip selected.
MouseMove, xpos, ypos, 0 ;---------------------------Moves mouse back to original position x and y.
BlockInput, off ;------------------------------------Re-enables user input.
return
;Applies the crop effect.
;DONE
i::
BlockInput, SendAndMouse ;---------------------------Selects the inputs to block.
BlockInput, On ;-------------------------------------Blocks input from the user.
SetKeyDelay, 0 ;-------------------------------------Makes key presses have 0 delay.
MouseGetPos, xpos, ypos ;----------------------------Stores current co-ordinates of mouse position as variables x and y.
MouseMove, 16, 732, 0 ;------------------------------Moves cursor to effects panel.
MouseClick, Left, , , 1 ;----------------------------Selects the effects panel.
Send, {BackSpace} ;----------------------------------Deletes text in textbox
SendInput, {BS}three ;-------------------------------Clears effects search bar and inputs effect.
MouseMove, 106, 878, 0 ;-----------------------------Moves mouse cursor to select the effect.
MouseClick, Left, , , 2 ;----------------------------Double clicks effect to apply it to the clip.
MouseMove, xpos, ypos, 0 ;---------------------------Returns the mouse to original position.
BlockInput, off ;------------------------------------Re-enables user input.
return
;Apply three way colour corrector to selected clip.
;DONE
o::
BlockInput, SendAndMouse ;---------------------------Selects the inputs to block.
BlockInput, On ;-------------------------------------Blocks input from the user.
SetKeyDelay, 0 ;-------------------------------------Makes key presses have 0 delay.
MouseGetPos, xpos, ypos ;----------------------------Stores current co-ordinates of mouse position as variables x and y.
MouseMove, 16, 732, 0 ;------------------------------Moves cursor to effects panel.
MouseClick, Left, , , 1 ;----------------------------Selects the effects panel.
Send, {BackSpace} ;----------------------------------Deletes text in textbox
SendInput, {BS}Color Key ;---------------------------Clears effects search bar and inputs effect.
MouseMove, 106, 878, 0 ;-----------------------------Moves mouse cursor to select the effect.
MouseClick, Left, , , 2 ;----------------------------Double clicks effect to apply it to the clip.
MouseMove, xpos, ypos, 0 ;---------------------------Returns the mouse to original position.
BlockInput, off ;------------------------------------Re-enables user input.
return
;Apply colour key effect (for getting rid of greenscreens) to selected clip.
;DONE
p::
BlockInput, SendAndMouse ;---------------------------Selects the inputs to block.
BlockInput, On ;-------------------------------------Blocks input from the user.
SetKeyDelay, 0 ;-------------------------------------Makes key presses have 0 delay.
MouseGetPos, xpos, ypos ;----------------------------Stores current co-ordinates of mouse position as variables x and y.
MouseMove, 16, 732, 0 ;------------------------------Moves cursor to effects panel.
MouseClick, Left, , , 1 ;----------------------------Selects the effects panel.
Send, {BackSpace} ;----------------------------------Deletes text in textbox
SendInput, {BS}gaussian ;----------------------------Clears effects search bar and inputs effect.
MouseMove, 106, 958, 0 ;-----------------------------Moves mouse cursor to select the effect.
MouseClick, Left, , , 2 ;----------------------------Double clicks effect to apply it to the clip.
MouseMove, xpos, ypos, 0 ;---------------------------Returns the mouse to original position.
BlockInput, off ;------------------------------------Re-enables user input.
return
;Apply gaussian blur effect to selected clip.
;DONE
;MISC HOTKEYS
F7::
BlockInput, SendAndMouse
BlockInput, On
SetKeyDelay, 0
MouseGetPos, xpos, ypos
CoordMode, Mouse, Screen
MouseMove, -1872, 636, 0
Click, Left
MouseMove, xpos, ypos, 0
BlockInput, Off
return
;Enables scale keyframes.
;DONE
F8::
BlockInput, SendAndMouse
BlockInput, On
SetKeyDelay, 0
MouseGetPos, xpos, ypos
CoordMode, Mouse, Screen
MouseMove, -1594, 636, 0
Click, Left
MouseMove, xpos, ypos, 0
BlockInput, Off
return
;Insert Scale Keyframe.
;DONE
^1::
BlockInput, SendAndMouse
BlockInput, On
SetKeyDelay, 0
MousegetPos, xpos, ypos
Coordmode, Mouse, Screen
MouseMove, 375, 755, 0
Click, Left
MouseMove, xpos, ypos, 0
BlockInput, Off
return
;Toggles snapping
;DONE
;TYPING MOD
LButton::
Suspend, Permit
MouseGetPos, xpos, ypos, , Class
KeyWait, LButton, T0.07
if (Class = class1 || Class = class2 || Class = class3 || Class = class4 || Class = class5 || Class = class6)
{
Suspend, On
sendinput, {LButton}
return
}
else if (ErrorLevel = 1) and (Class != class1 || Class != class2 || Class != class3 || Class != class4 || Class != class5 || Class != class6)
{
Suspend, Off
Send, {LButton down}
KeyWait, LButton
Send, {LButton}
return
}
else
{
Suspend, Off
Send, {LButton}
}
return
;Scale Mod
$~`::RapidHotkey("scale""Xposition""Yposition""whatever", 1, 0.1, 1)
scale:
Coordmode, Mouse, Screen
MouseGetPos, xpos, ypos
MouseMove, -1718, 638, 0
MouseClick, Left, , , 1, , D
loop {
if GetKeyState("~`", "P") = 1
goto endscale
}
Xposition:
Coordmode, Mouse, Screen
MouseGetPos, xpos, ypos
MouseMove, -1716, 616, 0
MouseClick, Left, , , 1, , D
loop {
if GetKeyState("~`", "P") = 1
goto endscale
}
Yposition:
Coordmode, Mouse, Screen
MouseGetPos, xpos, ypos
MouseMove, -1665, 616, 0
MouseClick, Left, , , 1, , D
loop {
if GetKeyState("~`", "P") = 1
goto endscale
}
endscale:
MouseClick, Left, , , 1, , U
MouseMove, xpos, ypos, 0
return
;Timeline Scrubbing Mod (COURTESY OF TARANVH)
RButton::
MouseGetPos, xpos, ypos ;------Stores current mouse coordinates as x and y coordinates.
PixelGetColor colour, %xpos%, %ypos%, RGB ;------------Enables AHK to know what the colour of the pixel below the mouse is at current mouse position (see above ^^)
if (colour = timeline1 || colour = timeline2 || colour = timeline3 || colour = timeline4 || colour = timeline5 || colour = timeline6) ;----Compares colour to above defined colours.
Send, ^+{a} ;------------------If the colour matches, exit out of any menu.
if (colour = timeline1 || colour = timeline2 || colour = timeline3 || colour = timeline4 || colour = timeline5 || colour = timeline6) ;----Compares colour to above defined colours.
{
click middle ;----Middle mouse highlights the timeline.
if GetKeyState("RButton", "P") = 1 ;-----Enables AHK to identify whether the right mouse button is being held down or not.
loop {
Send, +/ ;-----Bound in premiere to send the playhead to mouse position.
if GetKeyState("RButton", "P") = 0 ;-----If rmb is not held down from that point above, the loop ends.
{
Goto theEnd
}
}
Send {escape}
}
else {
sendinput, {Rbutton} ;------Allows right mouse button normal operation.
}
theEnd:
return