AutoHotKey script to help quick derushing/snapshoting a video

Started by JB, August 23, 2018, 03:58:53 PM

Previous topic - Next topic

JB

Hi,
i've made this script to accelerate my use of avidemux. I move in the video with the cursor keys and i have added :

- warning french keyboard layout, you may have to change keys to suit your editing -

q,s,d : place A mark, place B mark, save automatically with incremental suffix number version with leading zeroes added (vid00.mkv,vid01.mkv etc)
w : export png and save automatically with incremental suffix number version with leading zeroes added (vid00.png,vid01.png etc)

f : reset to 0 the suffix numbers (snapshot image and sequence vid)

the script captures the key only when avidemux is the active window. It"s a bit hackey and if you go too fast the script may hang  but it"s reasonably efficient for me.

;------ copy paste in your autoHotkey.ahk (see autoHotkey doc) ----------

imageNumber := 0
sequenceNumber := 0





#IfWinActive ahk_exe avidemux.exe
q::^PgUp
s::^PgDn

f::
MsgBox % " resetting indexes "
imageNumber := 0
sequenceNumber := 0
return

;save a video sequence with index
d::
str := Format("{:02}", sequenceNumber)
clipboard := str
Send, {Ctrl down}s{Ctrl up} 
SendInput, {Right}{Ctrl down}v{Ctrl up}{Enter}
sequenceNumber+=1
return  ; This ends the hotkey. The code below this point will not get triggered.

;save a png with index
w:: 
str := Format("{:02}", imageNumber)
clipboard := str
Send, {Ctrl down}p{Ctrl up} 
SendInput, {Right}{Ctrl down}v{Ctrl up}{Enter}
imageNumber+=1
return  ; This ends the hotkey. The code below this point will not get triggered.

#If


;---------------------------------------------------

Happy snapshoting ;)