AutoHotKey Hotkey

Do you want to make your Windows life easier and faster and you want to use a hotkey to do a certain task? Then you should learn about and install the freeware AutoHotKey software! For my job as a software developer I frequently have to type the same certain keywords many times during the day.

An AutoHotKey hotkey makes my life much easier. AutoHotKey is really not difficult to learn. It's even fun! Don't think it's difficult to learn, because it's not. I find this software very useful.

AutoHotKey

What is AutoHotKey

Probably you wonder: what is AutoHotKey? It's software that can automate certain tasks when you press a certain hotkey, like simultaneously pressing for example:

control alt n

You can make unlimited AutoHotKey hotkey scripts (just with Notepad or your favorite editor) and you can choose which hotkey scripts you want to use at a certain moment. An AutoHotKey hotkey script is actually a sort of macro which can be executed by pressing certain keystrokes simultaneously. I will teach you you to create a simple AutoHotKey hotkey on this page.

You can download the software for free from the download page. You can choose between a version that supports Unicode and another version that doesn't support Unicode.

By the way, in case you don't know what Unicode is: it's just a way how characters are stored in the computer. In Unicode, two bytes are used per character and the older ANSI-characterset uses one byte per character. The ASCII characterset is another characterset that also uses one byte per character.

When you want to do simple automation, it really doesn't matter which version you choose. I suggest to download the Unicode installer version and during installation choose Unicode (selected by default) and select all components. In the final step of installation you can choose to open the help file. For the moment, it's not necessary to open the help file. You can still open this help file via you start menu.

AutoHotKey is not really a piece of software like you're used to. You will not see a window once it's started. For example, go to your Windows start menu and start AutoHotKey. All you'll see is a piece of script that AutoHotKey understands. Nothing will happen the first time that you start AutoHotKey, you just see the script. Just read the script when you want to, or just read ahead on this page so you'll understand what it's all about.

When you start AutoHotKey a second time, you'll probably notice that AutoHotKey activated a script (by displaying the H icon in your Windows taskbar). It's just an indication the script is now active. You can close the script again by right-clicking with your mouse on the icon and click Exit. Maybe you'll also noticed you can pause a script or edit the script. Just close it for the meantime by clicking Exit.

Making your first AutoHotKey hotkey script

Start your favorite editor, say Notepad. Then type the following lines:

#space::
Send hello{Enter}
return

#p::
Send welcome{Enter}
return

Then save this file in a certain folder on your computer. I'd say, make a folder with the name 'Macro' and save the file in this folder. It's essential you'll give the file the .ahk extension, for example: script.ahk

Windows associated the ahk file-extension during installation with AutoHotKey. Any file you'll save in the future with the .ahk extension will be associated with AutoHotKey.

Let me quickly explain what this script does. The #space:: line indicates that when the Windows key and the space bar are pressed simultaneously, then the script below that line will be executed until the return statement is encountered. The Send hello{Enter} line will just take care of sending the characters hello plus an enter 'key' to your computer, as if you were typing these characters on the keyboard.

The #p:: line indicates a new hotkey: This script is executed when you press the Windows and the p key simultaneously on your keyboard. In that case the text welcome plus an enter 'key' will be send to your computer.

Activating your first AutoHotKey script

So, in above script two hotkeys were defined. Now let's make this script active. This is very easy to do. Just go to the folder on your computer where you stored your script file and double-click on it with the mouse. You'll notice that your script file has the H-icon of AutoHotKey. After double-clicking your script, you should see that your script is running by looking on your Windows taskbar (do you notice the H-icon?). This indicates your script is active.

Just to show that this is the case: open your favorite editor once again and start a new document. Then press the Windows key simultaneously with the space bar and your first hotkey script should now type hello and an enter in your document and nothing else. So the second hotkey script is not executed. Next, press the Windows and p key simultaneously and the text welcome should be typed in your document by AutoHotKey.

Well, these are the basics. You're now on your way creating many more scripts or hotkeys. Just take a look at the tutorial for beginners in the help file of AutoHotKey. Also you can search online for more example scripts, just search for:

autohotkey example script
autohotkey script
autohotkey tutorial

Below you can watch a video explaining more about AutoHotKey.

I hope you found my introduction useful. Good luck making your first AutoHotKey hotkey scripts. By the way, on the site of AutoHotKey there's also a forum where you can learn more.

The following site contains additional useful information:

http://lifehacker.com/316589/turn-any-action-into-a-keyboard-shortcut

AutoHotKey Hotkey • Automation •
Macro Script