Simulating fast forward and rewind in VirtualDub using Autohotkey
Virtualdub does not have a dedicated fast-preview option. The only way to fast-preview, without giving up on normal preview, is to hold down the arrow key. I find this a little inconvenient and slow.
Here is an Autohotkey script to simulate fast-forward and fast-rewind in Virtualdub. It uses the aforementioned key hold-down method but Autohotkey seems to be capable of sending keystrokes much faster than the physical keyboard; at least it does on my computer.
1SingleInstance
2#MaxThreadsPerHotkey 2
3#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
4SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
5
6vdubLeftDown:=false
7vdubRightDown:=false
8#IfWinActive, ahk_class VirtualDub
9
10 ;fast forward toggle
11 e::
12 global vdubLeftDown
13 global vdubRightDown
14 vdubLeftDown:=false
15 vdubRightDown:=!vdubRightDown
16 while vdubRightDown
17 {
18 if (WinActive("ahk_class VirtualDub"))
19 send, {Right down}
20 else
21 break
22 ;Sleep, 50
23 }
24 send, {Right Up}
25 return
26 ;fast backward toggle
27 q::
28 vdubRightDown:=false
29 vdubLeftDown:=!vdubLeftDown
30 while vdubLeftDown
31 {
32 If (WinActive("ahk_class VirtualDub"))
33 send, {Left down}
34 else
35 break
36 ;Sleep, 50
37 }
38 send, {Left Up}
39 return
40 w::
41 vdubLeftDown:=false
42 vdubRightDown:=false
43 return
44
45#IfWinActive
How to use
Shortcut | Function |
---|---|
e | Toggle fast-forward |
q | Toggle fast-rewind |
w | Stop fast-preview |
The script will preview as fast as your computer allows. If you are in the happy situation where the preview is too fast, comment out the Sleep function and add an appropriate delay.