Skip to content

Instantly share code, notes, and snippets.

@TaranVH
Created November 27, 2015 03:07
Show Gist options
  • Save TaranVH/3fe2c22f266ae891b965 to your computer and use it in GitHub Desktop.
Save TaranVH/3fe2c22f266ae891b965 to your computer and use it in GitHub Desktop.
;Apply ANY transition to a clip -- sadly you cannot use this to SAVE a CUSTOM transition
;A clip or clips must be selected first.
#SingleInstance force
#IfWinActive ahk_exe Adobe Premiere Pro.exe
Tippy(tipsHere, wait:=333)
{
ToolTip, %tipsHere%
SetTimer, noTip, %wait% ;--in 1/3 seconds by default, remove the tooltip
}
noTip:
ToolTip,
;removes the tooltip
return
transition(name, xx, yy)
{
Tippy(name " transition", 600)
SetKeyDelay, 0
MouseGetPos, xpos, ypos
BlockInput, on
BlockInput, MouseMove ;----------------Prevents the user from interfering with the operation.
ControlGetPos, X, Y, Width, Height, Edit1, ahk_class Premiere Pro
MouseMove, X-25, Y+10, 0 ;-------------moves the cursor directly on top of the magnifying glass icon -- your coordinates will vary!
sleep 10 ;-----------------------------does nothing for 10 milliseconds. I like to ensure that the previous command has had a bit of time
MouseClick, left, , , 1 ;--------------clicks the left mouse button once. This should select the search bar AND the text inside!
sleep 10
Send +{backspace} ;--------------------shift backspace is less destructive than regular backspace, and still deletes text!
sleep 10
Send %name%
sleep 10
MouseMove, 70+%xx%, 215+%yy%, 0, R ;---moves down to the transition's icon. Your pixel count will be different!
MouseClick, right
Send {down} ;--------------------------selects "set selected as default transition"
Send {enter}
Send ^t ;------------------------------CTRL T is my Premiere shortcut for "apply default transition to selection"
sleep 10
MouseMove, %xpos%, %ypos%, 0
BlockInput, off
BlockInput, MouseMoveOff ;-------------returns mouse control
}
F8::
transition("dip to black", 0, 0) ;-----the search result will not always be in the same location. This can modify coordinates.
Return
F9::
transition("push", 0, 0)
Return
F10::
transition("cross zoom", 0, 0)
Return
#IfWinActive
#SingleInstance force ;only one of these at a time!
#IfWinActive ahk_exe Adobe Premiere Pro.exe ;---ensures that this only happens in Premiere
Tippy(tipsHere, wait:=333)
{
ToolTip, %tipsHere%
SetTimer, noTip, %wait% ;--in 1/3 seconds by default, remove the tooltip
}
noTip:
ToolTip,
;removes the tooltip
return
;Bin panel "Back" button -- works on whatever bin you are hovering over!!
;Does NOT work with the BACKSPACE button like in Explorer. Harder to code that. need to detect if a typing box is selected.
F12::
Tippy("Bin panel BACK button (F12)")
BlockInput, On
BlockInput, MouseMove
MouseGetPos, xpos, ypos, Window, classNN
WinGetClass, class, ahk_id %Window% ;----"ahk_id %Window%" is important for SOME REASON. if you delete it, this doesnt work.
;;;WinGetClass, ahk_classs, A
;ToolTip, ahk_class = %class% `nClassNN = %classNN% `nTitle= %Window%
ControlGetPos, XX, YY, Width, Height, %classNN%, ahk_class %class%, SubWindow, SubWindow ;-I tried to exclude subwindows but I don't think it works...?
;---the ahk_class will be: ahk_class DroverLord - Window Class
XX := XX+28
YY := YY+7 ;------------------------moves the cursor directly onto the light gray part of the "back" icon. Your pixel count may vary.
MouseMove, XX, YY, 0 ;--------------for somereason you DO have to actually move the mouse for PixelGetColor to work.
PixelGetColor, colorr, XX, YY ;-----I like to double the last letter of some variable names so i know it's one of MINE! :P
;sleep 10
if (colorr = "0x515151") ;----------YOUR COLOR WILL VARY! In Premiere CS6, it's 0xC1C1C1. You'll have to run the script just up to this point to get the right color.
{
;MsgBox color %colorr% is CORRECT
Click XX, YY
}
MouseMove, xpos, ypos, 0 ;--------------instantly returns cursor to original coordinates
;MsgBox now we return mouse control ;---used for debugging
BlockInput, Off ;-----------------------if you forget to turn blockinput off, CTRL ALT DELETE will still work to return control.
BlockInput, MouseMoveOff
Return
;-------------------------------------------------------------------------------------------------------------------------------------------------------------
;close the titler with a shortcut -- (alt <)
;You can use alt F4 by default, but that is tricky to press, and it's a DANGEROUS shortcut that can shut down your program and even your computer.
;I wanted to combine with onto the F12 key, but I can't find a way to distingush if the cursor is above the titler or not...
!,::
Tippy("Close titler (alt < )", 1200)
MouseGetPos, xpos, ypos ;--------stores the cursor's current coordinates at X%xpos% Y%ypos%
ControlGetPos, X, Y, Width, Height, , ahk_class DroverLord - Window Class
MouseMove, X, Y-55, 0 ;----------moves the mouse onto the top bar of the titler
Click right
Send {down 6}{enter} ;-----------moves down the right click menu to the "close" option and presses ENTER to close
sleep 50 ;-----------------------wait 1/20th of a second to ensure everything is done
MouseMove, %xpos%, %ypos%, 0 ;---moves the cursor back
return
#IfWinActive ; PREMIERE END
#SingleInstance force
#IfWinActive ahk_exe Adobe Premiere Pro.exe
Tippy(tipsHere, wait:=333)
{
ToolTip, %tipsHere%
SetTimer, noTip, %wait% ;--in 1/3 seconds by default, remove the tooltip
}
noTip:
ToolTip,
;removes the tooltip
return
;EFFECT CONTROLS PANEL ---TRANSFORM ICON SELECTOR
F4::
Tippy("transform icon - F5")
BlockInput, On
SetKeyDelay, 0
MouseGetPos, xpos, ypos
ControlGetPos, X, Y, Width, Height, DroverLord - Window Class2, ahk_class Premiere Pro, DroverLord - TabPanel Window
X := X+85
Y := Y+100
MouseMove, X, Y, 0
MouseClick, left
MouseMove, %xpos%, %ypos%, 0
BlockInput, Off
Return
;EFFECT CONTROLS PANEL --- MOTION EFFECT TRIANGLE UNFURL;
F5::
Tippy("triangle unfurl - F5")
BlockInput, on
BlockInput, MouseMove
SetKeyDelay, 0
MouseGetPos, xpos, ypos
ControlGetPos, X, Y, Width, Height, DroverLord - Window Class2, ahk_class Premiere Pro, DroverLord - TabPanel Window
MouseMove, X+20, Y+94, 0
MouseClick
;MouseMove, %xpos%, %ypos%, 0
BlockInput, off
BlockInput, MouseMoveOff
Return
#SingleInstance force
;Script for automatically responsing to feature requests
F11::
SetKeyDelay, 0
Send No.`n
Send http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform`n
Send -----------------------------------------------`n
Send Adobe Certified Expert Premiere Pro`n
Send Adobe Community Professional
Return
Process, Priority, , High ;----I don't know what this is or what it does or if I need it! lol!
;SetKeyDelay, 0
#SingleInstance force ;--------only one instance of this script may run at a time!
#IfWinActive ahk_exe Adobe Premiere Pro.exe
;---EVERYTHING BELOW THIS LINE WILL ONLY WORK INSIDE PREMIERE PRO!
;-------------------------------------------------------------------------------------------------------------------------------
; In autohotkey, the following special characters (usually) represent modifier keys:
; # is windows
; ^ is control
; ! is alt
; + shift
; list of other keys: http://www.autohotkey.com/docs/Hotkeys.htm
;RELEVANT SHORTCUTS I HAVE ASSIGNED IN PREMIERE
; u select clip at playhead
; ctrl alt shift d ripple delete
; backspace ripple delete --- but I don't use that in AutoHotKey because it's dangerous
; ctrl r speed/duration panel
; ctrl 1 toggle track targeting for AUDIO LAYER 1
; ctrl 2 toggle track targeting for AUDIO LAYER 2. And so on up to 8.
; 1 toggle track targeting for VIDEO LAYER 1
; 2 toggle track targeting for VIDEO LAYER 2. And so on up to 8.
; Be aware that sometimes other programs like PUUSH can overlap with your customized shortcuts.
;-------------------------------------------------------------------------------------------------------------------------------
; F1 - ripple delete clip (or blank) at playhead - requires target tracking to be ON!!
F1::
Send u^+!d
return
; control shift r = reverse selected clip
^+r::
Send ^r{tab}{tab}{space}{enter}
return
;these are commented out because i don't use them anymore:
; control g = make 200% speed
;^g::
;Send ^r200{Enter}
;return
; control h = make 50% speed
;^h::
;Send ^r50{Enter}
;return
;((((((((((((SAVE SELECTIONS OF CLIPS, AND RECALL THEM ANY TIME!))))))))))))))))))));
^!+1::
;RunWait, %comspec% /c C:\woosh.bat, c:\
RunWait, %comspec% /c C:\InsideClipboard.exe /loadclp "woosh.clp", c:\
send ^1 ;----- toggles audio layer 1 OFF (hopefully)
sleep 50
send ^v ;----- paste
send ^1 ;----- toggles audio layer 1 back on.
Return
^+!2::
;RunWait, %comspec% /c C:\bleep.bat, c:\
RunWait, %comspec% /c C:\InsideClipboard.exe /loadclp "bleep.clp", c:\
send ^1
sleep 50
send ^v
send ^1
click
Return
^+!3::
;msgbox you pressed Ctrl shift alt 3 = POP sound!
;clipboard = ; clear the clipboard
;RunWait, %comspec% /c C:\pop.bat, c:\
RunWait, %comspec% /c C:\InsideClipboard.exe /loadclp "pop.clp", c:\
send ^1
Sleep, 50
send ^v
send ^1
Return
;I have assigned all three of these shortcuts to one of my 3-key techkeys keyboards.
;Those are expensive though, considering you only get 3 more keys. (I got mine for free.)
;If you don't have macro buttons on your keyboard, you can use the function keys instead!
;((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
#IfWinActive
; everything below this line can now be used outside of premiere
;control alt shift T -- click on the address bar for any youtube video, and this will link you to the thumbnail!
;^!+T::
;Send {end}{left 11}{backspace 40}https://i.ytimg.com/vi/{right 11}/sddefault.jpg{enter}
;return
;;EXAMPLE: https://i.ytimg.com/vi/L-zDtBINvzk/hqdefault.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment