AutoHotkey could change your computing life. The freeware Windows 10 program allows you to write your own keyboard shortcuts for any program you use (or for Windows in general), taking even multi-step tasks that would require a lot of typing and mouse movement and turning them into one key combos. One could write a book on how to use all the advanced features of Autohotkey’s scripting language, but to get you started, we’ll provide a few basics. Below we show how to create a very simple keyboard shortcut that launches a website, build a “hotstring” that turns a short keyword into your entire email signature and a write a hotkey that that selects an item from a pulldown menu in Photoshop Elements, allowing you to crop with a single key stroke.

Before You Begin: Install AutoHotKey

Before You Begin: Install AutoHotKey

Before You Begin: Install AutoHotKey

Before you create an AutoHotKey Script, you need to download both the program itself and its editor.

Creating a Simple Hotkey Script

Creating a Simple Hotkey Script

Creating a Simple Hotkey Script

You’ll need to create and store all of your shortcuts in a single AutoHotkey File, which is simply a text file with the extension .ahk. You need your AutoHotkey file running in the background when at all times, if you want to use its shortcuts. We therefore recommend that you save the file in your Startup folder, which is usually located at C:\Users[USERNAME]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup. While you can edit your .ahk file in any text editor, including Windows Notepad, we recommend using SCiTE4AutoHotkey, which you downloaded above, because it auto suggests AutoHotkey commands and lets you run your scripts just by hitting the F5 key. Let’s make a very simple script that launches a website from anywhere in Windows, just by hitting a keyboard combo.

Creating a Hotstring to Autocomplete Text

Creating a Hotstring to Autocomplete Text

Creating a Hotstring to Autocomplete Text

With AutoHotkey, you can also create what’s called a “hotstring,” a short set amount of text that automatically turns into a larger piece of text (or even executes commands). Imagine if you could just type the text “mysig” into any program and have it automatically convert into your entire email signature. Here’s how to create a simple hotstring that does just that, by adding to your .ahk file.

Creating a Hotkey for a Menu Item

Creating a Hotkey for a Menu Item

Creating a Hotkey for a Menu Item

Perhaps the best use of a custom keyboard shortcut is for selecting an important and frequently-used action from a menu. For example, to crop an image in Adobe Photoshop Elements, you have to go all the way up to the top navigation and select “Crop” from a pulldown menu. However, if you’re constantly cropping images, you’re wasting time and straining your shoulder by poking the mouse or touchpad. Here’s how you can create a keyboard shortcut for a menu item in any program. 1. Open Active Window Info (Window Spy). It’s a small utility the AutoHotkey installer adds to your system when you first use it. Window Spy helps you learn the names of different windows and sections of windows so you can use them in your AutoHotkey script. 2. Open the app you want to write the shortcut for (ex: Photoshop Elements). 3. Hover your mouse over the pulldown menu you wish to access (ex: Image). 4. Hit Windows Key + A to freeze Window Spy’s display so that it doesn’t’ change. 5 .Take note of the Window class, which is usually written as ahk_class [class] in the Window, Title, Class and Process section. With Photoshop Elements, this is ahk_class pseeditor. 6. Enter #IfWinActive ahk_class pseeditor (or the current class name for your app) on a new line in your .ahk macro file. This line shows ensures that your keyboard macro only activates if the Photoshop Elements window is active. 7. Enter your keyboard shortcut on the next line. Make sure whatever key combination you choose is not already in-use in the program. We’ll use ^;:: (CTRL + ;) in this case because it’s available. 8. Take note of the “Client” coordinates (ex: 152, 23). 10. Open the pulldown and note the placement of your action item, crop. It is three steps down, which means that a user could activate it by hitting the down arrow on the keyboard three times and then hitting Enter. 11. Type Send {Down 3}{Enter} onto the next line. This tells the script to send three down arrow presses and one Enter press. To see a list of all keys you can send, check out AutoHotkey’s reference page. Special keys like Down Arrow and Enter have brackets around them but regular letters do not. 12. Type Return on the next line. Your script is now complete. There are other ways to write a script like this. For example, you could choose to send the letter P rather than three down arrows because, in Photoshop Elements, the letter P would jump you down to Crop. Depending on the program you choose and its menu structure, you may find that sending different key presses or mouse clicks is most effective.

Sharing Your Keyboard Shortcut File

Sharing Your Keyboard Shortcut File

Sharing Your Keyboard Shortcut File

If you want to share your AutoHotkey keyboard shortcut file with a friend, you have two choices:

Send them the .ahk file (ex: myhotkeys.ahk) and make sure they install AutoHotkey so they can run it. However, not everyone wants to install a separate app.Compile your .ahk file into an .exe, which anyone can run on its own.

To compile your keyboard shortcut file, simply select Compile from the Tools menu. An .exe version of the file (ex: myhotkeys.exe) will appear in the same directory as your .ahk file. Tell your friend to put the .exe file (or the .ahk file if you choose that route) in the Windows Startup folder. That’s usually C:\Users[username]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.

Customize Windows 10

Customize Windows 10

Customize Windows 10

Previous TipNext Tip

Create Custom Keyboard ShortcutsMake Windows 10 Look and Feel Like Windows 7Change the Default Windows FontTurn Off Notification and System SoundsChange Your Desktop Background in Windows 10Change the Icon SizeGive Windows 10 a Dark ThemeMake Your Own Windows 10 ThemeHide Your Name on the Login ScreenAdd Another Column to the Start MenuGet Mac-Like File PreviewsAdd My Computer Icon to DesktopEdit Photos to Fit as BackgroundsAdd Accent ColorsCustomize Autoplay MenuInstall and Delete FontsCustomize the Action CenterDisable Transparency EffectsGet Classic Solitaire and MinesweeperChange the Look of Windows 10 BooksAdd a URL Field to the TaskbarAdd Clocks from Multiple Time ZonesGet the Old Volume Control BackDisable Windows 10 Startup DelayAdd Quick Contacts to the Start MenuShow Hidden Files and FoldersEnable Spatial SoundBest ThemesAll Windows 10 TipsChange the Login Screen BackgroundInstall New Desktop Themes