Monday, January 15, 2007

Using AutoHotkey to open common bins

Software: Avid (All versions)
Platform: Windows
Skill Level: Intermediate

A lot of my editing time is spent using the same bins over and over: Graphics bins, Voiceover bins etc. I edit a weekly show, and I used to automate the opening of these bins by creating a template project and then copying that project name to the weekly series name each time I needed it (I wrote a Windows script that made this a bit easier).

Recently I discovered a slightly more flexible way of doing this using the brilliant open source program AutoHotkey. Now I must stress that I'm using this program in a very dumbed-down way. AutoHotkey is capable of creating remarkable automation macros that incorporate keyboard, mouse and other user input. The macro I've listed below is basically just setting up a series of key combinations to open my common bins. So if you'd like to duplicate my methods, just follow these steps:

  1. Download and install AutoHotkey.
  2. Copy and Paste my macro text below (the section in grey courier font) into a text file, and save it somewhere on your Avid with an .ahk extension. I.E. AvidKeys.ahk
  3. Modify the path names and the hotkeys to suit your installation.
  4. Double-click on the .ahk file, and those hotkeys will now open the bins you requested in one step. (The comments after any semi-colon explain most of the functions - the AutoHotkey help file has complete documentation)

;AVID Common Commands AutoHotkey Script

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

;Each bin (complete path, name and extension is assigned to a variable)

GFX = C:\Avid Projects\_OL 2006\_GFX 2006\00 GFX MASTER 2006.avb
SOURCE = C:\Avid Projects\_OL 2006\_GFX 2006\10 GFX SOURCE 2006.avb
VO = H:\Offline projects\_BHAG 12 OFFLINE\FINAL VO
PROJ = H:\Offline projects\_BHAG 12 OFFLINE
ONLINE = H:\Online projects\_OL 2006
MUSIC = C:\Avid Projects\_OL 2006\_GFX 2006\21 Music 2006.avb
FX = C:\Avid Projects\_OL 2006\_GFX 2006\22 Sound FX.avb
CMAPS = G:\2006 Climate Maps\By Zone

;# corresponds to the WINDOWS key, and ! is ALT - so the hotkey to open my common graphics bin is WINDOWS-ALT-G

#!g::
SendInput ^9
SendInput ^o
SendInput %GFX%
SendInput {Enter}
return


#!s::
SendInput ^9
SendInput ^o
SendInput %SOURCE%
SendInput {Enter}
return

#!v::
SendInput ^9
SendInput ^o
SendInput %VO%
SendInput {Enter}
return

#!p::
SendInput ^9
SendInput ^o
SendInput %PROJ%
SendInput {Enter}
return

#!o::
SendInput ^9
SendInput ^o
SendInput %ONLINE%
SendInput {Enter}
return

#!m::
SendInput ^9
SendInput ^o
SendInput %MUSIC%
SendInput {Enter}
return

#!f::
SendInput ^9
SendInput ^o
SendInput %FX%
SendInput {Enter}
return

#!c::
SendInput i
SendInput %CMAPS%
SendInput {Enter}
return

;WINDOWS-ALT-N adds 4 video tracks and 10 audio tracks to any existing sequence.

#!n::
SendInput ^y^y^y^y
SendInput ^u^u^u^u^u^u^u^u^u^u
return

#!z::
SendInput ^y^y^y^y^y
SendInput ^u^u^u^u^u^u^u^u^u^u^u^u
return


Disclaimer