Autohotkeys

From Librivox Wiki
Jump to: navigation, search

AUTOHOTKEYS -

AutoHotkey is an open source scripting language for Windows that can automate and customize almost any action on your PC.

In LibriVox, it is used with Audacity to make editing quicker and easier. (thanks to Karlsson for the following information)

To download and install:

1) Install. go to [1] click the first link Installer for Autohotkey. follow the dialog boxes and install the program on your computer.

2) Add a script for Autohotkeys to follow. Start Notepad, go to [2]and copy the script in red, then save it on your desktop as a simple text file with the extension .ahk (e.g. as "audacity.ahk" on the desktop*). When you double-click the script-file, it becomes active and you find it as a green and white symbol with an "H" in your tray. Now you can select a range in Audacity, hit CapsLock+d ad you hear your corrected recording.

Of course you can choose any other hotkey, and you can edit the script in any way; look at the Autohotkey documentation. You can automate almost anything by sending keystrokes and mouse clicks, and you can write a mouse or keyboard macro by hand or use the macro recorder.

  • ) Important: the file must have the file-extension .ahk, and NOT .txt! indows 2000 and XP, open Windows Explorer and choose Tools | Folder Options | View, and uncheck the box for "Hide file extensions for known file types".

The most frequent action I have to do when editing audio data with Audacity is deleting repeats, silence or messed up words/phrases. Usually these steps have to be made: -Bold text selecting the range of data that I want to delete with the mouse - hit "z" to find Zero Crossings - hit "Delete" - click some centimetres left into the audio track to listen to the corrected data - hit "Space" to start playing.

I found this rather cumbersome; so now I use a single hotkey that I scripted with Autohotkey (http://www.autohotkey.com). So the only thing I have to do is to select the data and then hit "CapsLock + d", and I directly hear the corrected data.


The script that you are copying from philslibrivoxpage contains 4 different hot key combinations:

CapsLock & D = will delete a selection after finding z crossings, then zoom out to normal, back up 2 seconds and start the playback. CapsLock & 2 = will amplify the selection X2 CapsLock & 3 = will deamplify the selection X3 CapsLock & 4 = will deamplify the selection X4.

You should hold down the CapsLock while pressing the other key at the same time.

Other scripts can be written of course and can be added to this script or made into stand alone scripts. To see how to create your own scripts and edit the ones you have, go to [3].

Personal tools