Translate faster with AutoHotkey

Freeware that can improve your productivity! Automatic text insertion, shortcuts etc. The possibilities are endless.

In translation, as in many things in today’s world, you constantly feel the need to do things quicker, be more efficient, or more productive.

There are plenty of ways to improve productivity. One of the best illustrations is no doubt automatic text insertion where the user types the first few letters of a word and the software inserts the rest of the word or expression. A definite time-saver. This function is available in most office software and translation environments (CAT tools).

But if, like me, you constantly juggle with several different packages (Trados, Transit NXT, Across, Word, to name but a few), then you have a big problem: you have to manually set up the lists in each package. Grrrrr.

Thankfully, there is a solution

It goes by the name of AutoHotkey. With this lightweight, free, open source automation programme for Windows you can write scripts to automate pretty much anything.

Some functions are very easy to implement and particularly useful for translators (or anyone else who spends all day on a computer). With a little bit of preparation time, you can improve your translation speed no end!

In this article, I shall present the functions I use the most: automatic text insertion, reassigning keys and keyboard shortcuts.

The main advantage is that the functions that you set up work in all programmes. There is no need to set up each piece of software separately!

Keys

Download and install AutoHotkey

Go to the official AutoHotkey site and click on Download AutoHotkey.

Once you have set up the software, you need to create a script, i.e. a text file in .ahk format.

For a more detailed explanation, see the official tutorial.

To write your scripts, I recommend Notepad++ (then select AutoIt in the Language menu and all will become clear).

Now for the serious stuff:

Creating automatic text insertions

Principle

The simplest function to set up. Here, you indicate in the script the letters that will be automatically replaced by corresponding word or expression. You can create entries for technical terms or expressions that you often use or for your email signatures etc.

The entries work in all windows on your computer: CAT tools, browser, email software etc.

In the example below, two automatic text entries have been defined: when I type the characters “hel” and “imp”, the software automatically inserts the words, “Hello” and “important”, respectively.

Syntax

::hel::Hello

:o:imp::important

How does it work?

Let’s take a look at the example above.

When I type the characters “hel” and then hit the space bar or the comma of any other punctuation, the three characters are replaced by the word “hello”, followed by a space.

When I type the characters “imp” and then hit the space bar or the comma of any other punctuation, the three characters “imp” are replaced by the word “important” without a space afterwards. That is the role of the o between the first two colons.

You can create a list of entries as long as you need. Be careful not to use chains of characters that form actual words. If you use the abbreviation “cher”, to mean “cherokee” for example, then the next time you write an email in French, you are likely to address your client with a “Cherokee Monsieur Martin”, which he will probably find quite strange.

Of course, you can use this function for a number of things, your name, your email, your address, phrases in emails or anything you type often.

Reassigning keys

Principle

For those who work on a keyboard without a numeric keypad and need to use TagEditor[1], you can use AutoHotkey to assign keys to numbers and “simulate” a numeric keypad.

In TagEditor, you confirm a segment and move on to the next by pressing a combination of keys: Alt and the + key on the numeric keypad.

With AutoHotkey, you can assign the + to any key on the keyboard (preferably one you don’t use). I chose Ctrl right.

With the little script below, I press Alt and Ctrl right to confirm a segment.

Syntax

RCtrl::NumpadAdd

RCtrl is the code used by AutoHotkey to designate Ctrl right on the keyboard.

NumpadAdd corresponds to the + key on the numeric keypad.

The complete list of keys and codes is on the official AutoHotkey site.

How does it work?

In this simplified example, the key is replaced, which means that you can no longer use Ctrl right for the Ctrl function. (However, you can activate the shortcut in certain windows only, using the IfWinActive function.)

You can reassign keys as you wish, as long as you have some idea of the syntax.

Setting up shortcuts

Principle

If you often work on large projects over several days, weeks or months, you can set up shortcuts in AutoHotkey to open all the software and documents you need for that particular project with a combination of keys.

Syntax

#w:: ; Win + W Run, C:Program FilesOmegaT.exe, ,min

Run, D:MyFilesMyDocument.xlsx, ,max

Run, D:MyFilesMyGlossary.xlsx, ,max

Run firefox.exe

return

First line: your combination of keys (here, Windows + W).

The complete list of keys is on the official AutoHotkey site.

Following lines:

Run : tells the system to run or execute the file

File location: you can also just write the name of the software (for example OmegaT, but it doesn’t always work)

min/max: to adjust the window display size

return : end of command

How does it work?

When you simultaneously press Windows and W, all the software and files are executed in the order that they appear in the command. If your computer is slow or the list is long, this can take a while. It is a real time saver when you open the same documents every morning.

So, over to you! (bonus inside)

So now you know all you need to write your first scripts. As a bonus, I’m sharing a model script that you can use to set up your own. It includes:

  • a few automatic text entries (to get you started)
  • the + sign assigned to Ctrl right on the keyboard
  • a shortcut to open several files

To download it: Model script AutoHotkey (zip)

Over to you!

GIF

Conclusion

These examples are just a tiny sample of the multitude of things you can do with AutoHotkey. This little piece of software can save you precious time once you have written the right scripts. I set up a very long list of automatic text insertions for technical terms that I use frequently and keyboard shortcuts for a number of special characters I use often (accents on capitals, French quotation marks etc.)

The three functions I have shown here are by no means the only useful ones. If you are not afraid of a spot of programming, have a look at AutoHotkey support page and start experimenting. The official AutoHotkey site offers a fairly comprehensive tutorial to get you started.

If this article has convinced you, or if you are already a master of AutoHotkey or other task automation software, then feel free to share your experiences in the comments below.

[1] I sympathize.

Leave a Reply

Your email address will not be published. Required fields are marked *