diff --git a/.gitattributes b/.gitattributes index bdb0cab..198a7c4 100644 --- a/.gitattributes +++ b/.gitattributes @@ -14,4 +14,4 @@ *.pdf diff=astextplain *.PDF diff=astextplain *.rtf diff=astextplain -*.RTF diff=astextplain +*.RTF diff=astextplain \ No newline at end of file diff --git a/SECOND KEYBOARD - Used with Premiere functions, transitions, effects.ahk b/SECOND KEYBOARD - Used with Premiere functions, transitions, effects.ahk index 0a79c1d..4dd5732 100644 --- a/SECOND KEYBOARD - Used with Premiere functions, transitions, effects.ahk +++ b/SECOND KEYBOARD - Used with Premiere functions, transitions, effects.ahk @@ -108,12 +108,12 @@ transY29 = 244 ;;;tooltip maker;;;;;;;;;;;;;; Tippy(tipsHere, wait:=333) { -ToolTip, %tipsHere% -SetTimer, noTip, %wait% ;--in 1/3 seconds by default, remove the tooltip + ToolTip, %tipsHere% + SetTimer, noTip, %wait% ;--in 1/3 seconds by default, remove the tooltip } noTip: - ToolTip, - ;removes the tooltip +ToolTip, +;removes the tooltip return ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -132,21 +132,21 @@ return ;but it doesn't apply them to the clips. effectsPanelType(item) { -SetKeyDelay, 0 -ControlFocus, Edit1, ahk_class Premiere Pro ;this is the effects panel, according to windowspy -sleep 10 -send {tab} -sleep 10 -send +{tab} -sleep 10 -Send +{backspace} -;Sleep, 10 -Send %item% -;now this next part re-selects the field in case you want to type anything different -sleep 5 -send {tab} -sleep 5 -send +{tab} + SetKeyDelay, 0 + ControlFocus, Edit1, ahk_class Premiere Pro ;this is the effects panel, according to windowspy + sleep 10 + send {tab} + sleep 10 + send +{tab} + sleep 10 + Send +{backspace} + ;Sleep, 10 + Send %item% + ;now this next part re-selects the field in case you want to type anything different + sleep 5 + send {tab} + sleep 5 + send +{tab} } ;USING THE FUNCTION: @@ -162,43 +162,43 @@ send +{tab} ;This is the one I actually use!! preset(item) { -BlockInput, SendAndMouse -BlockInput, On -;Send ^!+` -;Sleep 10 -;Send ^!+7 -;Sleep 10 -SetKeyDelay, 0 -MouseGetPos, xpos, ypos ;-----------------------stores the cursor's current coordinates at X%xpos% Y%ypos% -ControlGetPos, X, Y, Width, Height, Edit1, ahk_class Premiere Pro ;;;highlights Premier's effects panel search bar (info gotten from window spy) -MouseMove, X+Width+10, Y+Height/2, 0 -sleep 5 -MouseClick, left, , , 1 ;------------------------clicks on X -MouseMove, X-25, Y+10, 0 -sleep 5 -; MouseClick, left, , , 1 ;----------------------clicks on Q icon to prepare for deletion -; sleep 5 -; Send +{backspace} ;----------------------------deletes shit -; sleep 5 -MouseClick, left, , , 1 -sleep 5 -Send %item% -sleep 30 -MouseMove, 52, 65, 0, R ;-----------------------moves cursor down and directly onto the effect's icon -MouseGetPos, iconX, iconY -ControlGetPos, , , www, hhh, DroverLord - Window Class10, ahk_class Premiere Pro -MouseMove, www/3, hhh/2, 0, R ;-----------------clicks in about the CENTER of the Effects panel. This clears the displayed presets from any duplication errors -MouseClick, left, , , 1 -; msgbox hi bitch -sleep 10 -MouseMove, iconX, iconY, 0 ;--------------------moves cursor BACK onto the effect's icon - -sleep 35 -MouseClickDrag, Left, , , %xpos%, %ypos%, 0 ;---drags this effect to the cursor's pervious coordinates, which should be above a clip. -sleep 10 -;Send ^+!0 ;-------------------------------------returns focus to the timeline. doesn't work for multiple timelines :( -MouseClick, left, , , 1 ;------------------------returns focus to the timeline. -BlockInput, off + BlockInput, SendAndMouse + BlockInput, On + ;Send ^!+` + ;Sleep 10 + ;Send ^!+7 + ;Sleep 10 + SetKeyDelay, 0 + MouseGetPos, xpos, ypos ;-----------------------stores the cursor's current coordinates at X%xpos% Y%ypos% + ControlGetPos, X, Y, Width, Height, Edit1, ahk_class Premiere Pro ;;;highlights Premier's effects panel search bar (info gotten from window spy) + MouseMove, X+Width+10, Y+Height/2, 0 + sleep 5 + MouseClick, left, , , 1 ;------------------------clicks on X + MouseMove, X-25, Y+10, 0 + sleep 5 + ; MouseClick, left, , , 1 ;----------------------clicks on Q icon to prepare for deletion + ; sleep 5 + ; Send +{backspace} ;----------------------------deletes shit + ; sleep 5 + MouseClick, left, , , 1 + sleep 5 + Send %item% + sleep 30 + MouseMove, 52, 65, 0, R ;-----------------------moves cursor down and directly onto the effect's icon + MouseGetPos, iconX, iconY + ControlGetPos, , , www, hhh, DroverLord - Window Class10, ahk_class Premiere Pro + MouseMove, www/3, hhh/2, 0, R ;-----------------clicks in about the CENTER of the Effects panel. This clears the displayed presets from any duplication errors + MouseClick, left, , , 1 + ; msgbox hi bitch + sleep 10 + MouseMove, iconX, iconY, 0 ;--------------------moves cursor BACK onto the effect's icon + + sleep 35 + MouseClickDrag, Left, , , %xpos%, %ypos%, 0 ;---drags this effect to the cursor's pervious coordinates, which should be above a clip. + sleep 10 + ;Send ^+!0 ;-------------------------------------returns focus to the timeline. doesn't work for multiple timelines :( + MouseClick, left, , , 1 ;------------------------returns focus to the timeline. + BlockInput, off } ;That's the end of the function. Now we make shortcuts to CALL that function, each with a different parameter! @@ -240,70 +240,70 @@ BlockInput, off ;This is a function that will mostly be launched from the 2nd keyboard. insertAudio(sound) { -CoordMode, Mouse, Screen -BlockInput, SendAndMouse -BlockInput, On -BlockInput, MouseMove -;msgbox, "now in insertAudio()" -SetKeyDelay, 0 -Send ^!+e ;this will highlight the EVENTS window, which is always ON MY LEFT-MOST MONITOR. This is important, or controlgetpos will only get the positions of the currently "active" windows on another monitor. -MouseGetPos, xpos, ypos ; stores the cursor's current coordinates at X%xpos% Y%ypos% -MouseMove, -4600, 21, 0 ; just moves onto monitor 1 -sleep 30 -;msgbox, moved to screen 1 -CoordMode, Mouse, Window - -;msgbox, monitor 1 -ControlGetPos, X, Y, Width, Height, Edit2, ahk_class DroverLord - Window Class -;determined with Window Spy. Keep in mind that you MIGHT need a space after the "Window Class " or you might not! -;ControlGetPos, X, Y, Width, Height, DroverLord - Window Class7, ahk_class DroverLord - Window Class - -MouseMove, X+Width+10, Y+Height/2, 0 ;moves to the "X" to delete whatever might be in the search bar. -sleep 10 -MouseClick, left, , , 1 ;-------------clicks on X, to erase whatever text might be in the search bar. -MouseMove, X-25, Y+10, 0 -sleep 10 - -MouseClick, left, , , 1 -sleep 22 -If (sound != "SEARCH") -{ - ;msgbox this is not a search - Send %sound% - sleep 300 - MouseMove, X+25, Y+150, 0 ;moves down and onto the 1st result. - sleep 10 - - MouseClick, left, , , 2 ;loads the clip into the source monitor - sleep 20 - send . ;period = overwrite. - - ; MouseClick, right, , , 1 - ; Send {down 17} ;highlights "overwrite" (you can't just press "o", which would be nice...) - ; Send {enter} - - sleep 10 - MouseMove, X+Width+10, Y+Height/2, 0 ;moves to X - sleep 22 - MouseClick, left, , , 1 ;-------------clicks on X, to erase whatever text might be inserted. - Send ^!+7 ;this will highlight the EFFECTS window, which is always ON MY 2ND, PRIMARY MONITOR. - Sleep 20 - CoordMode, Mouse, Screen - MouseMove, 2123, 21, 0 ;moves mouse back onto Primary monitor - ;CoordMode, Mouse, Window - Sleep 20 - MouseMove, xPos, yPos, 0 ;moves mouse back to its original coordinates, instantly. - Sleep 10 - BlockInput, off - BlockInput, MouseMoveOff -} -else -{ - ;msgbox this was a search -} -BlockInput, off -BlockInput, MouseMoveOff -Return + CoordMode, Mouse, Screen + BlockInput, SendAndMouse + BlockInput, On + BlockInput, MouseMove + ;msgbox, "now in insertAudio()" + SetKeyDelay, 0 + Send ^!+e ;this will highlight the EVENTS window, which is always ON MY LEFT-MOST MONITOR. This is important, or controlgetpos will only get the positions of the currently "active" windows on another monitor. + MouseGetPos, xpos, ypos ; stores the cursor's current coordinates at X%xpos% Y%ypos% + MouseMove, -4600, 21, 0 ; just moves onto monitor 1 + sleep 30 + ;msgbox, moved to screen 1 + CoordMode, Mouse, Window + + ;msgbox, monitor 1 + ControlGetPos, X, Y, Width, Height, Edit2, ahk_class DroverLord - Window Class + ;determined with Window Spy. Keep in mind that you MIGHT need a space after the "Window Class " or you might not! + ;ControlGetPos, X, Y, Width, Height, DroverLord - Window Class7, ahk_class DroverLord - Window Class + + MouseMove, X+Width+10, Y+Height/2, 0 ;moves to the "X" to delete whatever might be in the search bar. + sleep 10 + MouseClick, left, , , 1 ;-------------clicks on X, to erase whatever text might be in the search bar. + MouseMove, X-25, Y+10, 0 + sleep 10 + + MouseClick, left, , , 1 + sleep 22 + if (sound != "SEARCH") + { + ;msgbox this is not a search + Send %sound% + sleep 300 + MouseMove, X+25, Y+150, 0 ;moves down and onto the 1st result. + sleep 10 + + MouseClick, left, , , 2 ;loads the clip into the source monitor + sleep 20 + send . ;period = overwrite. + + ; MouseClick, right, , , 1 + ; Send {down 17} ;highlights "overwrite" (you can't just press "o", which would be nice...) + ; Send {enter} + + sleep 10 + MouseMove, X+Width+10, Y+Height/2, 0 ;moves to X + sleep 22 + MouseClick, left, , , 1 ;-------------clicks on X, to erase whatever text might be inserted. + Send ^!+7 ;this will highlight the EFFECTS window, which is always ON MY 2ND, PRIMARY MONITOR. + Sleep 20 + CoordMode, Mouse, Screen + MouseMove, 2123, 21, 0 ;moves mouse back onto Primary monitor + ;CoordMode, Mouse, Window + Sleep 20 + MouseMove, xPos, yPos, 0 ;moves mouse back to its original coordinates, instantly. + Sleep 10 + BlockInput, off + BlockInput, MouseMoveOff + } + else + { + ;msgbox this was a search + } + BlockInput, off + BlockInput, MouseMoveOff + Return } ;;;;just for testing -- not permanent key assignments. @@ -317,54 +317,54 @@ Return recallTransition(n:=0) { -CoordMode, Mouse, Screen - -BlockInput, SendAndMouse -BlockInput, On -BlockInput, MouseMove -;msgbox, "now in recallTransition()" -SetKeyDelay, 0 -MouseGetPos, xpos, ypos ;-----------------------stores the cursor's current coordinates at X%xpos% Y%ypos% -MouseMove, 7500, 3400, 0 ; moves onto monitor 3 -sleep 30 -mouseClick -sleep 100 -send ^+d ;deselect -sleep 30 -;msgbox, moved to screen 3 -CoordMode, Mouse, Window - -MouseGetPos, , , Window, classNN ; I need to ASK the mouse cursor that the Class number is of the window it's on. It changes a lot. - -;msgbox, should be about to move to corner -ControlGetPos, X, Y, Width, Height, %classNN%, ahk_class DroverLord - Window Class -MouseMove, X, Y, 0 -sleep 10 -;msgbox, should be in top corner now -sleep 10 -tempX = transX%n% -tempY = transY%n% -;msgbox, %tempX% %tempY% "these are the tempX and Y variables" -temp2X := %tempX% -temp2Y := %tempY% -;msgbox, %n% -MouseMove, %temp2X%, %temp2Y%, 0, R -;msgbox, should have moved to transition -sleep 70 -mouseClick -;msgbox, "I hope this is the right location" -Send ^c -sleep 40 -CoordMode, Mouse, Screen -MouseMove, 2000, 0, 0 ;moves back to the primary monitor -sleep 10 -MouseMove, xpos, ypos, 0 -sleep 10 -mouseClick -sleep 5 -Send ^v -BlockInput, off -BlockInput, MouseMoveOff + CoordMode, Mouse, Screen + + BlockInput, SendAndMouse + BlockInput, On + BlockInput, MouseMove + ;msgbox, "now in recallTransition()" + SetKeyDelay, 0 + MouseGetPos, xpos, ypos ;-----------------------stores the cursor's current coordinates at X%xpos% Y%ypos% + MouseMove, 7500, 3400, 0 ; moves onto monitor 3 + sleep 30 + mouseClick + sleep 100 + send ^+d ;deselect + sleep 30 + ;msgbox, moved to screen 3 + CoordMode, Mouse, Window + + MouseGetPos, , , Window, classNN ; I need to ASK the mouse cursor that the Class number is of the window it's on. It changes a lot. + + ;msgbox, should be about to move to corner + ControlGetPos, X, Y, Width, Height, %classNN%, ahk_class DroverLord - Window Class + MouseMove, X, Y, 0 + sleep 10 + ;msgbox, should be in top corner now + sleep 10 + tempX = transX%n% + tempY = transY%n% + ;msgbox, %tempX% %tempY% "these are the tempX and Y variables" + temp2X := %tempX% + temp2Y := %tempY% + ;msgbox, %n% + MouseMove, %temp2X%, %temp2Y%, 0, R + ;msgbox, should have moved to transition + sleep 70 + mouseClick + ;msgbox, "I hope this is the right location" + Send ^c + sleep 40 + CoordMode, Mouse, Screen + MouseMove, 2000, 0, 0 ;moves back to the primary monitor + sleep 10 + MouseMove, xpos, ypos, 0 + sleep 10 + mouseClick + sleep 5 + Send ^v + BlockInput, off + BlockInput, MouseMoveOff } @@ -372,180 +372,179 @@ BlockInput, MouseMoveOff - ;I know that using F24 is stupid. I know that writing and reading a .txt file on disk is stupid, as are all of these stupid ELSE IF statements. (keep in mind, AHK has no SWITCH function.) ;If you can write some code that will work better, please do! And send me a link! F24:: -FileRead, key, C:\Users\TaranVanHemert\Documents\keypressed.txt ;note that you don't need to backslash your backslashes in AHK, you DO need to do that in LUAmacros, though! -tippy(key) ; this will just launch a quick tooltip that shows you what key you pressed. -If (key = "o") -preset("flip horizontal") -else if(key = "p") -preset("flip vertical") -else if(key = "i") -preset("multiply") - -else if (key = "leftbracket") -preset("pop in motion") -else if(key = "rightbracket") -preset("pop out motion") - -else if (key = "y") -preset("pop in transform") -else if(key = "u") -preset("pop out transform") - -else if(key = "m") -preset("pan down") -else if(key = "j") -preset("pan up") -else if(key = "n") -preset("pan left") -else if(key = "comma") -preset("pan right") -else if(key = "h") -preset("zoom fast") -else if(key = "k") -preset("zoom slow") - -else if(key = "period") -preset("crop small") -else if(key = "slash") -preset("crop full") -else if(key = "singlequote") -preset("warp") - -else if(key = "semicolon") -preset("blur with edges") -else if(key = "l") -preset("LTT") - -else if(key = "F6") -insertAudio("buzz") -else if(key = "F7") -insertAudio("ding") -else if(key = "F8") -insertAudio("bleep") -else if(key = "F9") -insertAudio("woosh") -else if(key = "F10") -insertAudio("woosh TSFX") -else if(key = "F11") -insertAudio("bwoop") -else if(key = "F12") -insertAudio("pop") -else if(key = "F5") -insertAudio("SEARCH") - -;[[[[[[[[begin transitions]]]]]]]]]]]] - -else if (key = "insert") ;FLASH TRANSITIONS -preset("impact flash long") ;recallTransition(15) ;it turns out you can SAVE transition presets from the effect controls triple line mnu button. But only cross dissolve and 3rd party transitions. I use filmimpact.net and red giant universe transitions. Lot of good free ones! -else if(key = "home") -preset("impact flash med") ;recallTransition(14) -else if(key = "pageup") -preset("impact flash short") ;recallTransition(13) -else if(key = "delete") ;DISSOLVE TRANSITIONS -preset("cross dissolve long") ;recallTransition(12) -else if(key = "end") -preset("cross dissolve med") ;recallTransition(11) -else if(key = "pagedown") -preset("cross dissolve short") ;recallTransition(10) -else if(key = "q") ;WIPE transitions -recallTransition(20) -else if(key = "w") -recallTransition(21) -else if(key = "e") -recallTransition(22) -else if(key = "a") -recallTransition(23) -; else if(key = "s") -; recallTransition(??) ; iris -else if(key = "d") -recallTransition(24) -else if(key = "z") -recallTransition(25) -else if(key = "x") -recallTransition(26) -else if(key = "c") -recallTransition(27) - -else if(key = "minus") -audioMonoMaker(0) -else if(key = "equals") -audioMonoMaker(1) - -else if(key = "r") -Send ^!+{F1} ;copy 1 ; this uses insideclipboard.exe to work. more info here: https://www.youtube.com/watch?v=3ScBB7I1BEA -else if(key = "f") -Send ^!+{F2} ;copy 2 -else if(key = "v") -Send ^!+{F3} ;copy 3 - -else if(key = "t") -Send ^!{F1} ;paste 1 -else if(key = "g") -Send ^!{F2} ;paste 2 -else if(key = "b") -Send ^!{F3} ;paste 3 - - -else if(key = "up") ;impact push transitions - fun fact, you can SAVE TRANSITION PRESETS if they are cross dissolve or from a 3rd party. In the effect conrtols triple line menu. -preset("push up") ; recallTransition(1) ;<--- previously was this. -else if(key = "left") -preset("push left") ; recallTransition(2) -else if(key = "down") -preset("push down") ; recallTransition(4) -else if(key = "right") -preset("push right") ; recallTransition(3) - -else if(key = "enter") -Send ^!e ;remove effects - -else if(key = "num0") ;just mirroring the normal numpad - IDK how else to do this. -Send {Numpad0} -else if(key = "num1") -Send {Numpad1} -else if(key = "num2") -Send {Numpad2} -else if(key = "num3") -Send {Numpad3} -else if(key = "num4") -Send {Numpad4} -else if(key = "num5") -Send {Numpad5} -else if(key = "num6") -Send {Numpad6} -else if(key = "num7") -Send {Numpad7} -else if(key = "num8") -Send {Numpad8} -else if(key = "num9") -Send {Numpad9} -else if(key = "numDiv") -Send {NumpadDiv} -else if(key = "numMult") -Send {NumpadMult} + FileRead, key, C:\Users\TaranVanHemert\Documents\keypressed.txt ;note that you don't need to backslash your backslashes in AHK, you DO need to do that in LUAmacros, though! + tippy(key) ; this will just launch a quick tooltip that shows you what key you pressed. + if (key = "o") + preset("flip horizontal") + else if(key = "p") + preset("flip vertical") + else if(key = "i") + preset("multiply") + + else if (key = "leftbracket") + preset("pop in motion") + else if(key = "rightbracket") + preset("pop out motion") + + else if (key = "y") + preset("pop in transform") + else if(key = "u") + preset("pop out transform") + + else if(key = "m") + preset("pan down") + else if(key = "j") + preset("pan up") + else if(key = "n") + preset("pan left") + else if(key = "comma") + preset("pan right") + else if(key = "h") + preset("zoom fast") + else if(key = "k") + preset("zoom slow") + + else if(key = "period") + preset("crop small") + else if(key = "slash") + preset("crop full") + else if(key = "singlequote") + preset("warp") + + else if(key = "semicolon") + preset("blur with edges") + else if(key = "l") + preset("LTT") + + else if(key = "F6") + insertAudio("buzz") + else if(key = "F7") + insertAudio("ding") + else if(key = "F8") + insertAudio("bleep") + else if(key = "F9") + insertAudio("woosh") + else if(key = "F10") + insertAudio("woosh TSFX") + else if(key = "F11") + insertAudio("bwoop") + else if(key = "F12") + insertAudio("pop") + else if(key = "F5") + insertAudio("SEARCH") + + ;[[[[[[[[begin transitions]]]]]]]]]]]] + + else if (key = "insert") ;FLASH TRANSITIONS + preset("impact flash long") ;recallTransition(15) ;it turns out you can SAVE transition presets from the effect controls triple line mnu button. But only cross dissolve and 3rd party transitions. I use filmimpact.net and red giant universe transitions. Lot of good free ones! + else if(key = "home") + preset("impact flash med") ;recallTransition(14) + else if(key = "pageup") + preset("impact flash short") ;recallTransition(13) + else if(key = "delete") ;DISSOLVE TRANSITIONS + preset("cross dissolve long") ;recallTransition(12) + else if(key = "end") + preset("cross dissolve med") ;recallTransition(11) + else if(key = "pagedown") + preset("cross dissolve short") ;recallTransition(10) + else if(key = "q") ;WIPE transitions + recallTransition(20) + else if(key = "w") + recallTransition(21) + else if(key = "e") + recallTransition(22) + else if(key = "a") + recallTransition(23) + ; else if(key = "s") + ; recallTransition(??) ; iris + else if(key = "d") + recallTransition(24) + else if(key = "z") + recallTransition(25) + else if(key = "x") + recallTransition(26) + else if(key = "c") + recallTransition(27) + + else if(key = "minus") + audioMonoMaker(0) + else if(key = "equals") + audioMonoMaker(1) + + else if(key = "r") + Send ^!+{F1} ;copy 1 ; this uses insideclipboard.exe to work. more info here: https://www.youtube.com/watch?v=3ScBB7I1BEA + else if(key = "f") + Send ^!+{F2} ;copy 2 + else if(key = "v") + Send ^!+{F3} ;copy 3 + + else if(key = "t") + Send ^!{F1} ;paste 1 + else if(key = "g") + Send ^!{F2} ;paste 2 + else if(key = "b") + Send ^!{F3} ;paste 3 + + + else if(key = "up") ;impact push transitions - fun fact, you can SAVE TRANSITION PRESETS if they are cross dissolve or from a 3rd party. In the effect conrtols triple line menu. + preset("push up") ; recallTransition(1) ;<--- previously was this. + else if(key = "left") + preset("push left") ; recallTransition(2) + else if(key = "down") + preset("push down") ; recallTransition(4) + else if(key = "right") + preset("push right") ; recallTransition(3) + + else if(key = "enter") + Send ^!e ;remove effects + + else if(key = "num0") ;just mirroring the normal numpad - IDK how else to do this. + Send {Numpad0} + else if(key = "num1") + Send {Numpad1} + else if(key = "num2") + Send {Numpad2} + else if(key = "num3") + Send {Numpad3} + else if(key = "num4") + Send {Numpad4} + else if(key = "num5") + Send {Numpad5} + else if(key = "num6") + Send {Numpad6} + else if(key = "num7") + Send {Numpad7} + else if(key = "num8") + Send {Numpad8} + else if(key = "num9") + Send {Numpad9} + else if(key = "numDiv") + Send {NumpadDiv} + else if(key = "numMult") + Send {NumpadMult} Return ;from F24 #IfWinNotActive ahk_exe Adobe Premiere Pro.exe ; this is so that you can use the additional copy/paste features OUTSIDE of premiere also. F24:: -FileRead, key, C:\Users\TaranVanHemert\Documents\keypressed.txt -tippy(key) -If(key = "r") -Send ^!+{F1} ;copy 1 -else if(key = "f") -Send ^!+{F2} ;copy 2 -else if(key = "v") -Send ^!+{F3} ;copy 3 -else if(key = "t") -Send ^!{F1} ;paste 1 -else if(key = "b") -Send ^!{F3} ;paste 3 -else if(key = "g") -Send ^!{F2} ;paste 2 + FileRead, key, C:\Users\TaranVanHemert\Documents\keypressed.txt + tippy(key) + If(key = "r") + Send ^!+{F1} ;copy 1 + else if(key = "f") + Send ^!+{F2} ;copy 2 + else if(key = "v") + Send ^!+{F3} ;copy 3 + else if(key = "t") + Send ^!{F1} ;paste 1 + else if(key = "b") + Send ^!{F3} ;paste 3 + else if(key = "g") + Send ^!{F2} ;paste 2 Return ; from f24 outside premiere @@ -554,84 +553,83 @@ Return ; from f24 outside premiere ; these are so I can launch the scripts from my logitech G15 macros if I want to #!l:: -;msgbox, audio leftener -audioMonoMaker(0) + ;msgbox, audio leftener + audioMonoMaker(0) Return #!r:: -;msgbox, audio rightener -audioMonoMaker(1) + ;msgbox, audio rightener + audioMonoMaker(1) Return audioMonoMaker(track) { -BlockInput, SendAndMouse ;prevent mouse from moving -BlockInput, On -BlockInput, MouseMove -global tToggle = 1 -;msgbox, track is %track% -if (track = 1) -{ - ;msgbox, this is the RIGHT track - addPixels = 38 -} -else if (track = 0) -{ - addPixels = 0 - ;msgbox, this is for the left audio track -} -Send ^!a ;control alt a --- ; audio channels shortcut - dont use this anywhere else please -sleep 500 -CoordMode, Mouse, Screen -CoordMode, Pixel, Screen -MouseGetPos, xPosAudio, yPosAudio -MouseMove, 1786 + addPixels, 880, 0 -sleep 50 -MouseGetPos, Xkolor, Ykolor -sleep 50 -PixelGetColor, kolor, %Xkolor%, %Ykolor% -; 080808 = color when cursor is over the box -; 1F1F1F = color when cursor NOT over the box -; DDDDDD = color when there is a checkmark already in the box -; note that these colors will be different depending on your UI brightness set in premiere. -If (kolor = "0x080808") ;"kolor" is the variable name rather than "color" because "color" might be already used for something else in AHK. -{ - click left -} -else if (kolor = "0xDDDDDD") -{ - ; there was a checkmark in this box already -} -sleep 5 -MouseMove, 1789 + addPixels, 914, 0 -sleep 30 -MouseGetPos, Xkolor2, Ykolor2 -sleep 10 -PixelGetColor, k2, %Xkolor2%, %Ykolor2% -sleep 30 -If (k2 = "0x080808") -{ - click left -} -else if (k2 = "0xDDDDDD") -{ - ; there was a checkmark in this box already -} -;msgbox, k2 color was %k2% -sleep 5 -Send {enter} -MouseMove, xPosAudio, yPosAudio, 0 -BlockInput, off -BlockInput, MouseMoveOff ;return mouse control to the user. + BlockInput, SendAndMouse ;prevent mouse from moving + BlockInput, On + BlockInput, MouseMove + global tToggle = 1 + ;msgbox, track is %track% + if (track = 1) + { + ;msgbox, this is the RIGHT track + addPixels = 38 + } + else if (track = 0) + { + addPixels = 0 + ;msgbox, this is for the left audio track + } + Send ^!a ;control alt a --- ; audio channels shortcut - dont use this anywhere else please + sleep 500 + CoordMode, Mouse, Screen + CoordMode, Pixel, Screen + MouseGetPos, xPosAudio, yPosAudio + MouseMove, 1786 + addPixels, 880, 0 + sleep 50 + MouseGetPos, Xkolor, Ykolor + sleep 50 + PixelGetColor, kolor, %Xkolor%, %Ykolor% + ; 080808 = color when cursor is over the box + ; 1F1F1F = color when cursor NOT over the box + ; DDDDDD = color when there is a checkmark already in the box + ; note that these colors will be different depending on your UI brightness set in premiere. + if (kolor = "0x080808") ;"kolor" is the variable name rather than "color" because "color" might be already used for something else in AHK. + { + click left + } + else if (kolor = "0xDDDDDD") + { + ; there was a checkmark in this box already + } + sleep 5 + MouseMove, 1789 + addPixels, 914, 0 + sleep 30 + MouseGetPos, Xkolor2, Ykolor2 + sleep 10 + PixelGetColor, k2, %Xkolor2%, %Ykolor2% + sleep 30 + if (k2 = "0x080808") + { + click left + } + else if (k2 = "0xDDDDDD") + { + ; there was a checkmark in this box already + } + ;msgbox, k2 color was %k2% + sleep 5 + Send {enter} + MouseMove, xPosAudio, yPosAudio, 0 + BlockInput, off + BlockInput, MouseMoveOff ;return mouse control to the user. } ; monomaker ;The optional script below allows you to use the TILDE to go DOWN one folder level in explorer #IfWinActive ahk_exe explorer.exe - -`:: -Send !{up} -Return - + `:: + Send !{up} + Return + #IfWinActive diff --git a/Taran's Premiere Mods/PREMIERE MOD - Instant RESCALE button.ahk b/Taran's Premiere Mods/PREMIERE MOD - Instant RESCALE button.ahk index 927e215..d82a0b5 100644 --- a/Taran's Premiere Mods/PREMIERE MOD - Instant RESCALE button.ahk +++ b/Taran's Premiere Mods/PREMIERE MOD - Instant RESCALE button.ahk @@ -2,12 +2,13 @@ Tippy(tipsHere, wait:=333) { -ToolTip, %tipsHere% -SetTimer, noTip, %wait% ;--in 1/3 seconds by default, remove the tooltip + ToolTip, %tipsHere% + SetTimer, noTip, %wait% ;--in 1/3 seconds by default, remove the tooltip } + noTip: - ToolTip, - ;removes the tooltip + ToolTip, + ;removes the tooltip return @@ -16,17 +17,17 @@ return ;EFFECT CONTROLS PANEL ---TRANSFORM ICON CLICKER F5:: -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 + 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 @@ -37,193 +38,193 @@ Return ; F4:: -Tippy("triangle unfurl - F4") -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 + Tippy("triangle unfurl - F4") + 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 - ; SINGLE KEYSTROKE SCALING FUNCTION +; SINGLE KEYSTROKE SCALING FUNCTION ;-------------------------------------------------------------------------------- ; You have to HOLD DOWN scaleKey the entire time. no need to click and hold the mouse button, it is done for you ; Only works if your UI is a VERY PARTICULAR SHADE OF GRAY - so those values are different for everyone, unfortunately resetFromAutoScale() { - MouseMove, Xbegin, Ybegin, 0 - blockinput, off - blockinput, MouseMoveOff - ToolTip, , , , 2 - SetTimer, noTip, 333 + MouseMove, Xbegin, Ybegin, 0 + blockinput, off + blockinput, MouseMoveOff + ToolTip, , , , 2 + SetTimer, noTip, 333 } clickTransformIcon() { -ControlGetPos, Xcorner, Ycorner, Width, Height, DroverLord - Window Class2, ahk_class Premiere Pro -MouseMove, Xcorner+85, Ycorner+100, 0 -MouseClick, left + ControlGetPos, Xcorner, Ycorner, Width, Height, DroverLord - Window Class2, ahk_class Premiere Pro + MouseMove, Xcorner+85, Ycorner+100, 0 + MouseClick, left } - mButton:: -global scaleKey = "mButton" -dontrestart = 0 -restartPoint: -blockinput, sendandMouse -blockinput, MouseMove -blockinput, on - -; send ^+d ;deselect anything that might be selected. We want to affect ONLY the clip the playhead is currently on top of - what we can see in the program monitor. -; sleep 10 -; Send ^p ;--- i have CTRL P set up to toggle "selection follows playhead," which I never use otherwise. ;this makes it so that only the TOP clip is selected. -; sleep 10 -; Send ^p ;this now disables "selection follows playehad." I don't know if there is a way to CHECK if it is on or not. -; sleep 10 - -ToolTip, A, , , 2 -MouseGetPos Xbegin, Ybegin -global Xbegin = Xbegin -global Ybegin = Ybegin -; MsgBox, "please verify that the mouse cannot move" -; sleep 2000 -ControlGetPos, Xcorner, Ycorner, Width, Height, DroverLord - Window Class2, ahk_class Premiere Pro ;effect controls panel - -;move mouse to expected triangle location. this is a VERY SPECIFIC PIXEL which will be right on the EDGE of the triangle when it is OPEN. -;This takes advantage of the anti-aliasing between the color of the triangle, and that of the background behind it. -YY := Ycorner+96 -XX := Xcorner+15 -MouseMove, XX, YY, 0 -sleep 10 - -PixelGetColor, colorr, XX, YY - -if (colorr = "0xDDDDDD") -{ - ;tooltip, color %colorr% means closed triangle-will click and then SCALE SEARCH - blockinput, Mouse - Click XX, YY - sleep 5 - clickTransformIcon() - findScale() - Return -} -else if (colorr = "0xADADAD" || colorr = "0xACACAC") ;again, this values will be different for everyone. check with window spy. This needs to lie on the edge of the trangle when it is open. -{ - ;tooltip, %colorr% means OPENED triangle. SEARCHING FOR SCALE - blockinput, Mouse - sleep 5 - clickTransformIcon() - findScale() - Return -} -else if (colorr = "0x313131") -{ - ;tooltip, this is a normal panel color of 313131 or %colorr% - Send ^p ;--- i have CTRL P set up to toggle "selection follows playhead," which I never use otherwise. ;this makes it so that only the TOP clip is selected. - sleep 10 - Send ^p ;this disables "selection follows playehad." I don't know if there is a way to CHECK if it is on or not. - resetFromAutoScale() - ;play noise - If (dontrestart = 0) - { - dontrestart = 1 - goto, restartPoint ;this is stupid but it works. Feel free to improve any of my code; I know it's garbage. - } - Return -} -else -{ - tooltip, %colorr% not expected - ;play noise - resetFromAutoScale() - Return -} + global scaleKey = "mButton" + dontrestart = 0 + restartPoint: + blockinput, sendandMouse + blockinput, MouseMove + blockinput, on + + ; send ^+d ;deselect anything that might be selected. We want to affect ONLY the clip the playhead is currently on top of - what we can see in the program monitor. + ; sleep 10 + ; Send ^p ;--- i have CTRL P set up to toggle "selection follows playhead," which I never use otherwise. ;this makes it so that only the TOP clip is selected. + ; sleep 10 + ; Send ^p ;this now disables "selection follows playehad." I don't know if there is a way to CHECK if it is on or not. + ; sleep 10 + + ToolTip, A, , , 2 + MouseGetPos Xbegin, Ybegin + global Xbegin = Xbegin + global Ybegin = Ybegin + ; MsgBox, "please verify that the mouse cannot move" + ; sleep 2000 + ControlGetPos, Xcorner, Ycorner, Width, Height, DroverLord - Window Class2, ahk_class Premiere Pro ;effect controls panel + + ;move mouse to expected triangle location. this is a VERY SPECIFIC PIXEL which will be right on the EDGE of the triangle when it is OPEN. + ;This takes advantage of the anti-aliasing between the color of the triangle, and that of the background behind it. + YY := Ycorner+96 + XX := Xcorner+15 + MouseMove, XX, YY, 0 + sleep 10 + + PixelGetColor, colorr, XX, YY + + if (colorr = "0xDDDDDD") + { + ;tooltip, color %colorr% means closed triangle-will click and then SCALE SEARCH + blockinput, Mouse + Click XX, YY + sleep 5 + clickTransformIcon() + findScale() + Return + } + else if (colorr = "0xADADAD" || colorr = "0xACACAC") ;again, this values will be different for everyone. check with window spy. This needs to lie on the edge of the trangle when it is open. + { + ;tooltip, %colorr% means OPENED triangle. SEARCHING FOR SCALE + blockinput, Mouse + sleep 5 + clickTransformIcon() + findScale() + Return + } + else if (colorr = "0x313131") + { + ;tooltip, this is a normal panel color of 313131 or %colorr% + Send ^p ;--- i have CTRL P set up to toggle "selection follows playhead," which I never use otherwise. ;this makes it so that only the TOP clip is selected. + sleep 10 + Send ^p ;this disables "selection follows playehad." I don't know if there is a way to CHECK if it is on or not. + resetFromAutoScale() + ;play noise + if (dontrestart = 0) + { + dontrestart = 1 + goto, restartPoint ;this is stupid but it works. Feel free to improve any of my code; I know it's garbage. + } + + Return + } + else + { + tooltip, %colorr% not expected + ;play noise + resetFromAutoScale() + Return + } + Return ;from autoscaler findScale() ; searches for the "scale" text inside of the Motion effect. requires an actual image. { -tooltip, ;deletes tooltips -;msgbox, now we are in findScale -sleep 5 -MouseGetPos xPos, yPos -CoordMode Pixel ; Interprets the coordinates below as relative to the screen rather than the active window. -ImageSearch, FoundX, FoundY, xPos-70, yPos, xPos+800, yPos+500, C:\Users\TaranVanHemert\Desktop\AHK\scale.png -if ErrorLevel = 2 - { - ;tippy(Could not conduct the search) - resetFromAutoScale() - } -else if ErrorLevel = 1 - { - ;msgbox, error level 1 - ;tippy(Icon could not be found on the screen) - resetFromAutoScale() - } -else - { - ;tooltip, The icon was found at %FoundX%x%FoundY%. - ;msgbox, The icon was found at %FoundX%x%FoundY%. - MouseMove, FoundX, FoundY, 0 - sleep 5 - findHotText() - } + tooltip, ;deletes tooltips + ;msgbox, now we are in findScale + sleep 5 + MouseGetPos xPos, yPos + CoordMode Pixel ; Interprets the coordinates below as relative to the screen rather than the active window. + ImageSearch, FoundX, FoundY, xPos-70, yPos, xPos+800, yPos+500, C:\Users\TaranVanHemert\Desktop\AHK\scale.png + if ErrorLevel = 2 + { + ;tippy(Could not conduct the search) + resetFromAutoScale() + } + else if ErrorLevel = 1 + { + ;msgbox, error level 1 + ;tippy(Icon could not be found on the screen) + resetFromAutoScale() + } + else + { + ;tooltip, The icon was found at %FoundX%x%FoundY%. + ;msgbox, The icon was found at %FoundX%x%FoundY%. + MouseMove, FoundX, FoundY, 0 + sleep 5 + findHotText() + } } findHotText() { -tooltip, ; removes any tooltips that might be in the way of the searcher. -; https://www.autohotkey.com/docs/commands/PixelSearch.htm -CoordMode Pixel -MouseGetPos, xxx, yyy -PixelSearch, Px, Py, xxx+50, yyy+10, xxx+500, yyy+11, 0x35A1A8, 25, Fast RGB -if ErrorLevel - { - ;tooltip,"colorNotFound") - resetFromAutoScale() - } -else - { - ;tooltip, A color within 25 shades of variation was found at X%Px% Y%Py% - ;MsgBox, A color within 25 shades of variation was found at X%Px% Y%Py%. - MouseMove, Px+10, Py+5, 0 - Click down left - Loop - { - blockinput, off - blockinput, MouseMoveOff - tooltip, "hot text" %scaleKey% - sleep 15 - GetKeyState, state, %scaleKey%, P - if state = U - { - Click up left - ;tooltip, "%scaleKey% is now physically UP so we are exiting now" - sleep 15 - resetFromAutoScale() - ; MouseMove, Xbegin, Ybegin, 0 - ; tooltip, - ; ToolTip, , , , 2 - ; blockinput, off - ; blockinput, MouseMoveOff - Return - } - } - } + tooltip, ; removes any tooltips that might be in the way of the searcher. + ; https://www.autohotkey.com/docs/commands/PixelSearch.htm + CoordMode Pixel + MouseGetPos, xxx, yyy + PixelSearch, Px, Py, xxx+50, yyy+10, xxx+500, yyy+11, 0x35A1A8, 25, Fast RGB + if ErrorLevel + { + ;tooltip,"colorNotFound") + resetFromAutoScale() + } + else + { + ;tooltip, A color within 25 shades of variation was found at X%Px% Y%Py% + ;MsgBox, A color within 25 shades of variation was found at X%Px% Y%Py%. + MouseMove, Px+10, Py+5, 0 + Click down left + Loop + { + blockinput, off + blockinput, MouseMoveOff + tooltip, "hot text" %scaleKey% + sleep 15 + GetKeyState, state, %scaleKey%, P + if state = U + { + Click up left + ;tooltip, "%scaleKey% is now physically UP so we are exiting now" + sleep 15 + resetFromAutoScale() + ; MouseMove, Xbegin, Ybegin, 0 + ; tooltip, + ; ToolTip, , , , 2 + ; blockinput, off + ; blockinput, MouseMoveOff + Return + } + } + } } ;;;-------------------------------------------------------------------------------------------- - ;code to locate an invisible cursor ; F7:: ; Loop @@ -234,7 +235,4 @@ else ;F7 Up::tooltip, , , ,3 return - #IfWinActive ; PREMIERE END - - diff --git a/Taran's Premiere Mods/PREMIERE MOD - Right click timeline and unused simple transitions.ahk b/Taran's Premiere Mods/PREMIERE MOD - Right click timeline and unused simple transitions.ahk index 17ee9a4..c0b3a0e 100644 --- a/Taran's Premiere Mods/PREMIERE MOD - Right click timeline and unused simple transitions.ahk +++ b/Taran's Premiere Mods/PREMIERE MOD - Right click timeline and unused simple transitions.ahk @@ -11,14 +11,14 @@ ; 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. +; 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. @@ -34,12 +34,13 @@ timeline6 = nevermind ; 0x2a2a2a ;top of timeline Tippy(tipsHere, wait:=333) ;will create and then delete a tooltip { -ToolTip, %tipsHere% -SetTimer, noTip, %wait% ;--in 1/3 seconds by default, remove the tooltip + ToolTip, %tipsHere% + SetTimer, noTip, %wait% ;--in 1/3 seconds by default, remove the tooltip } + noTip: - ToolTip, - ;removes the tooltip + ToolTip, + ;removes the tooltip return @@ -51,7 +52,7 @@ F1::Send u^+!d ;I use this one ALL THE TIME. ; control shift r = reverse selected clip ^+r:: -Send ^r{tab}{tab}{space}{enter} + Send ^r{tab}{tab}{space}{enter} return ;these are commented out because i don't use them anymore: @@ -69,22 +70,23 @@ return ;<<>>>>> ~Rbutton:: -MouseGetPos X, Y -PixelGetColor colorr, %X%, %Y%, RGB -;Tooltip, not working, colors are different -if (colorr = timeline1 || colorr = timeline2 || colorr = timeline3 || colorr = timeline4 || colorr = timeline5 || colorr = timeline6) -{ - ; tooltip, %colorr% - while GetKeyState("Rbutton") - { - Send / - Tooltip, Timeline! - sleep 16 - } - Tooltip, - Send {escape} ;in case you end up inside the "delete" right click menu from the timeline - ;MouseClick, left -} + MouseGetPos X, Y + PixelGetColor colorr, %X%, %Y%, RGB + ;Tooltip, not working, colors are different + if (colorr = timeline1 || colorr = timeline2 || colorr = timeline3 || colorr = timeline4 || colorr = timeline5 || colorr = timeline6) + { + ; tooltip, %colorr% + while GetKeyState("Rbutton") + { + Send / + Tooltip, Timeline! + sleep 16 + } + + Tooltip, + Send {escape} ;in case you end up inside the "delete" right click menu from the timeline + ;MouseClick, left + } Return ; from right click intercept @@ -93,32 +95,32 @@ Return ; from right click intercept transition(name, xx:=70, yy:=245) { -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% -;msgbox, should have typed stuff in -sleep 10 -MouseMove, %xx%, %yy%, 0, R ;---moves down to the transition's icon. Your pixel count will be different! -sleep 10 -;msgbox, should be on top of the transition -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 + 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% + ;msgbox, should have typed stuff in + sleep 10 + MouseMove, %xx%, %yy%, 0, R ;---moves down to the transition's icon. Your pixel count will be different! + sleep 10 + ;msgbox, should be on top of the transition + 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 } ;Using the code: @@ -133,9 +135,6 @@ BlockInput, MouseMoveOff ;-------------returns mouse control - - - ;-------------------------------------------------------------------------------------------------------------------------- @@ -149,21 +148,21 @@ BlockInput, MouseMoveOff ;-------------returns mouse control ;ControlGetPos, X, Y, Width, Height, DroverLord - Window Class2, ahk_class Premiere Pro, DroverLord - TabPanel Window ;Control ==== classNN ======= DroverLord - Window Class2 ;WinTitle === ahk_class ======= ahk_class Premiere Pro -;WinText ==== Text: ======= DroverLord - TabPanel Window +;WinText ==== Text: ======= DroverLord - TabPanel Window ;Effects: ;ControlGetPos, X, Y, Width, Height, Edit1, ahk_class Premiere Pro ;Control ==== classNN ======= edit 1 ///// or alternatively, the whole panel is: DroverLord - Window Class10... sometimes ;WinTitle === ahk_class ======= ahk_class Premiere Pro -;WinText ==== Text: ======= DroverLord - TabPanel Window +;WinText ==== Text: ======= DroverLord - TabPanel Window ;BIN: ;Control ==== classNN ======= DroverLord - Window Class2 ;WinTitle === ahk_class ======= DroverLord - Window Class -;WinText ==== Text: ======= DroverLord - TabPanel Window +;WinText ==== Text: ======= DroverLord - TabPanel Window ;Bin search bar: ;ControlGetPos, X, Y, Width, Height, Edit4, ahk_class DroverLord - Window Class ;Control ==== classNN ======= Edit1 ;WinTitle === ahk_class ======= DroverLord - Window Class -;WinText ==== Text: ======= [blank] +;WinText ==== Text: ======= [blank] diff --git a/Taran's Premiere Mods/WINDOWS MOD - Accelerated Scrolling 1.3.ahk b/Taran's Premiere Mods/WINDOWS MOD - Accelerated Scrolling 1.3.ahk index 0ed8872..ba5570d 100644 --- a/Taran's Premiere Mods/WINDOWS MOD - Accelerated Scrolling 1.3.ahk +++ b/Taran's Premiere Mods/WINDOWS MOD - Accelerated Scrolling 1.3.ahk @@ -42,60 +42,60 @@ WheelDown:: Goto Scroll #WheelDown:: Goto Quit Scroll: - t := A_TimeSincePriorHotkey - if (A_PriorHotkey = A_ThisHotkey && t < timeout) - { - ; Remember how many times we've scrolled in the current direction - distance++ - - ; Calculate acceleration factor using a 1/x curve - v := (t < 80 && t > 1) ? (250.0 / t) - 1 : 1 - - ; Apply boost - if (boost > 1 && distance > boost) - { - ; Hold onto the highest speed we've achieved during this boost - if (v > vmax) - vmax := v - else - v := vmax - - v *= distance / boost - } - - ; Validate - v := (v > 1) ? ((v > limit) ? limit : Floor(v)) : 1 - - if (v > 1 && tooltips) - QuickToolTip("×"v, timeout) - - - - MouseClick, %A_ThisHotkey%, , , v - } - else - { - ; Combo broken, so reset session variables - distance := 0 - vmax := 1 - - MouseClick %A_ThisHotkey% - } - return + t := A_TimeSincePriorHotkey + if (A_PriorHotkey = A_ThisHotkey && t < timeout) + { + ; Remember how many times we've scrolled in the current direction + distance++ + + ; Calculate acceleration factor using a 1/x curve + v := (t < 80 && t > 1) ? (250.0 / t) - 1 : 1 + + ; Apply boost + if (boost > 1 && distance > boost) + { + ; Hold onto the highest speed we've achieved during this boost + if (v > vmax) + vmax := v + else + v := vmax + + v *= distance / boost + } + + ; Validate + v := (v > 1) ? ((v > limit) ? limit : Floor(v)) : 1 + + if (v > 1 && tooltips) + QuickToolTip("×"v, timeout) + + + + MouseClick, %A_ThisHotkey%, , , v + } + else + { + ; Combo broken, so reset session variables + distance := 0 + vmax := 1 + + MouseClick %A_ThisHotkey% + } +return Quit: - QuickToolTip("Exiting Accelerated Scrolling...", 1000) - Sleep 1000 - ExitApp + QuickToolTip("Exiting Accelerated Scrolling...", 1000) + Sleep 1000 + ExitApp QuickToolTip(text, delay) { - ToolTip, %text% - SetTimer ToolTipOff, %delay% - return - - ToolTipOff: - SetTimer ToolTipOff, Off - ToolTip - return + ToolTip, %text% + SetTimer ToolTipOff, %delay% + return + + ToolTipOff: + SetTimer ToolTipOff, Off + ToolTip + return } diff --git a/taranLUAmacros.lua b/taranLUAmacros.lua index 2360bdb..614d2b8 100644 --- a/taranLUAmacros.lua +++ b/taranLUAmacros.lua @@ -16,61 +16,61 @@ sendToAHK = function (key) end local config = { - [45] = "insert", - [36] = "home", - [33] = "pageup", - [46] = "delete", - [35] = "end", - [34] = "pagedown", - [27] = "escape", - [112] = "F1", - [113] = "F2", - [114] = "F3", - [115] = "F4", - [116] = "F5", - [117] = "F6", - [118] = "F7", - [119] = "F8", - [120] = "F9", - [121] = "F10", - [122] = "F11", - [123] = "F12", - [8] = "backspace", - [220] = "backslash", - [13] = "enter", - [16] = "rShift", - [17] = "rCtrl", - [38] = "up", - [37] = "left", - [40] = "down", - [39] = "right", - [32] = "space", - [186] = "semicolon", - [222] = "singlequote", - [190] = "period", - [191] = "slash", - [188] = "comma", - [219] = "leftbracket", - [221] = "rightbracket", - [189] = "minus", - [187] = "equals", - [96] = "num0", - [97] = "num1", - [98] = "num2", - [99] = "num3", - [100] = "num4", - [101] = "num5", - [102] = "num6", - [103] = "num7", - [104] = "num8", - [105] = "num9", + [45] = "insert", + [36] = "home", + [33] = "pageup", + [46] = "delete", + [35] = "end", + [34] = "pagedown", + [27] = "escape", + [112] = "F1", + [113] = "F2", + [114] = "F3", + [115] = "F4", + [116] = "F5", + [117] = "F6", + [118] = "F7", + [119] = "F8", + [120] = "F9", + [121] = "F10", + [122] = "F11", + [123] = "F12", + [8] = "backspace", + [220] = "backslash", + [13] = "enter", + [16] = "rShift", + [17] = "rCtrl", + [38] = "up", + [37] = "left", + [40] = "down", + [39] = "right", + [32] = "space", + [186] = "semicolon", + [222] = "singlequote", + [190] = "period", + [191] = "slash", + [188] = "comma", + [219] = "leftbracket", + [221] = "rightbracket", + [189] = "minus", + [187] = "equals", + [96] = "num0", + [97] = "num1", + [98] = "num2", + [99] = "num3", + [100] = "num4", + [101] = "num5", + [102] = "num6", + [103] = "num7", + [104] = "num8", + [105] = "num9", - [106] = "numMult", + [106] = "numMult", [107] = "numDelete", -- 108 is unknown...? - [109] = "numMult", + [109] = "numMult", [110] = "numDelete", - [111] = "numDiv", + [111] = "numDiv", [144] = "numLock", --probably it is best to avoid this key. I keep numlock ON, or it has unexpected effects [192] = "`", --this is the tilde key just before the number row @@ -79,57 +79,57 @@ local config = { [18] = "alt", - [string.byte('Q')] = "q", - [string.byte('W')] = "w", - [string.byte('E')] = "e", - [string.byte('R')] = "r", - [string.byte('T')] = "t", - [string.byte('Y')] = "y", - [string.byte('U')] = "u", - [string.byte('I')] = "i", - [string.byte('O')] = "o", - [string.byte('P')] = "p", - [string.byte('A')] = "a", - [string.byte('S')] = "s", - [string.byte('D')] = "d", - [string.byte('F')] = "f", - [string.byte('G')] = "g", - [string.byte('H')] = "h", - [string.byte('J')] = "j", - [string.byte('K')] = "k", - [string.byte('L')] = "l", - [string.byte('Z')] = "z", - [string.byte('X')] = "x", - [string.byte('C')] = "c", - [string.byte('V')] = "v", - [string.byte('B')] = "b", - [string.byte('N')] = "n", - [string.byte('M')] = "m", + [string.byte('Q')] = "q", + [string.byte('W')] = "w", + [string.byte('E')] = "e", + [string.byte('R')] = "r", + [string.byte('T')] = "t", + [string.byte('Y')] = "y", + [string.byte('U')] = "u", + [string.byte('I')] = "i", + [string.byte('O')] = "o", + [string.byte('P')] = "p", + [string.byte('A')] = "a", + [string.byte('S')] = "s", + [string.byte('D')] = "d", + [string.byte('F')] = "f", + [string.byte('G')] = "g", + [string.byte('H')] = "h", + [string.byte('J')] = "j", + [string.byte('K')] = "k", + [string.byte('L')] = "l", + [string.byte('Z')] = "z", + [string.byte('X')] = "x", + [string.byte('C')] = "c", + [string.byte('V')] = "v", + [string.byte('B')] = "b", + [string.byte('N')] = "n", + [string.byte('M')] = "m", [string.byte('0')] = "0", - [string.byte('1')] = "1", - [string.byte('2')] = "2", - [string.byte('3')] = "3", - [string.byte('4')] = "4", - [string.byte('5')] = "5", + [string.byte('1')] = "1", + [string.byte('2')] = "2", + [string.byte('3')] = "3", + [string.byte('4')] = "4", + [string.byte('5')] = "5", [string.byte('6')] = "6", [string.byte('7')] = "7", [string.byte('8')] = "8", [string.byte('9')] = "9", - --[255] = "printscreen" --these keys do not work + --[255] = "printscreen" --these keys do not work } -- define callback for whole device lmc_set_handler('MACROS', function(button, direction) - if (direction == 1) then return end -- ignore down -- I believe this also has the effect of neutralizing the modifier keys, unfortunately. Not optimal. + if (direction == 1) then return end -- ignore down -- I believe this also has the effect of neutralizing the modifier keys, unfortunately. Not optimal. - if type(config[button]) == "string" then - print(' ') - print('Your key ID number is: ' .. button) - sendToAHK(config[button]) - else - print(' ') - print('Not yet assigned: ' .. button) - end + if type(config[button]) == "string" then + print(' ') + print('Your key ID number is: ' .. button) + sendToAHK(config[button]) + else + print(' ') + print('Not yet assigned: ' .. button) + end end)