Here’s a quick trick I learned that lets you automatically replace any common spelling mistakes you make while typing on your computer. The magic behind this little trick is AutoHotkey. AutoHotkey is a scripting tool that is seriously powerful, but can easily be used by anyone – not just programmers. AutoHotkey has a good tutorial here, but it basically works like this:
- Download AutoHotkey from their website and install it.
- Create a file named myscripts.ahk (or name it whatever you want, just make it an ahk file).
- Edit the file by right-clicking on it and clicking on Edit Script.
- Put your various scripts in the file then save it, close it, and run (double-click) it.
- For extra awesomeness, put that file in your computer’s startup folder so it will always be running.
Now the actual script that I use to fix my common spelling mistakes is this:
:*:xom:: SendInput com return
There are two important parts to that script. First, the “xom” is the spelling mistake I commonly make. Second, the “com” is what I actually meant to type. So you can put those three lines inside your ahk file and fix any of your common spelling mistakes. You can simply copy/paste the code multiple times to add more words that you want to automatically spell check.
When I put these three lines in my myscripts.ahk file, every single time I type “xom” it is replaced with “com“. It doesn’t matter where I’m typing – it can be my browser’s address bar, in an email, IM conversation, or anywhere else. And the replacement happens so fast that I usually don’t even catch it.
Give it a try! If you need any help let me know in the comments. I’m a big believer in AutoHotkey and it’s powers. I’ll add more useful scripts that I have in my ahk file to this blog eventually.