Many of you are probably already familiar with AutoHotKey. This small and free utility lets you automate tasks and make your PC work exactly the way you want it to. The program is driven by a custom scripting language that's easy to understand -- even for someone with little or no programming experience.

You can write a macro using a simple text editor, like notepad, or use the included macro recorder to create hotkeys for virtually any button or combination of keys. That may not sound like a big deal, but once you start grasping its potential you'll see it can be incredibly handy.

For example, you can assign a hotkey to launch any application you use regularly, or just switch to it if it is already running; assign abbreviations that expand as you type them; save time on repetitive tasks by setting the computer to auto-click a confirmation screen; or make the 'Scroll Lock' and Pause/Break keys do something useful for a change. The best part is that scripts can be compiled into an executable file and run on computers that don't have AutoHotkey installed.

Today we'll be looking at three simple time-saving scripts that can make your life easier and more productive.


Set any window to show 'Always on Top'

There's an endless number of scenarios where it can be useful to have a window show "on top," however this functionality is usually crippled by how inaccessible it is depending on the program. For example, say you’re trying to use the Windows Calculator and a PDF file at the same time, need to copy data from one document to another, or simply want a chat window visible while working on other stuff. Some programs have this option built in them, but if you simply can't be bothered with looking for it every time then a simple script can save you from constantly shuffling back and forth between windows.

Just create a new text file on Notepad, enter “^SPACE:: Winset, Alwaysontop, , A” (without the quotes), and save it as plain text with the .ahk file extension. Double-clicking this file loads the script on AutoHotKey. Now you can select any window and press Ctrl+Space to keep it on top even when it’s not the active window. You can change the “^SPACE” portion to whatever you like if you would prefer to use another hotkey, just remember to reload the script.


Toggle hidden files and extensions visibility with a shortcut

If you regularly need to access hidden files or change file extensions but don’t like the extra clutter that comes with leaving them always visible, there’s an easy way to toggle them on or off without the hassle of going into the Windows Explorer options every time.

Create a text file and paste the following code: (credit How-To Geek)

; WINDOWS KEY + Y TOGGLES FILE EXTENSIONS

#y:: RegRead, HiddenFiles_Status, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt If HiddenFiles_Status = 1 RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt, 0 Else RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt, 1 WinGetClass, eh_Class,A If (eh_Class = “#32770″ OR A_OSVersion = “WIN_VISTA”) send, {F5} Else PostMessage, 0×111, 28931,,, A Return

; WINDOWS KEY + H TOGGLES HIDDEN FILES

#h:: RegRead, HiddenFiles_Status, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden If HiddenFiles_Status = 2 RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 1 Else RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 2 WinGetClass, eh_Class,A If (eh_Class = "#32770" OR A_OSVersion = "WIN_VISTA") send, {F5} Else PostMessage, 0x111, 28931,,, A Return

Double-clicking this file will load the script on AutoHotKey. Now you can toggle hidden folders using the Windows Key + H and toggle file extensions using Windows Key + Y. Again, you can change the key combination to whatever you like.


Send yourself quick email reminders

Ideas often come when you are in the middle of something else, but if you neglect writing them down immediately as they come it’s likely you’ll be sorry later trying to remember what they were.

One simple way of going about when there’s no pen and paper at hand is sending yourself quick email reminders. With a simple AutoHotKey script you can save a lot of time and avoid distractions by not having to even open an email client or browser window.

First you'll need to grab this VBScript file from Cybernet News and customize it with your email account details – basically your email address and password. Once you’ve done that you'll need to create a new AutoHotkey script in the same folder with the text below, replacing the email address with your own: (credit Lifehacker)

#!e:: { InputBox, UserInput, Quick Email, Reminder:, , 380, 170 If Not ErrorLevel { Run, cscript.exe sendemail.vbs "email@gmail.com" "%UserInput%" "",, Min } Return }

After loading the script you can hit the Win+Alt+E shortcut key (or whatever you change it to by replacing the “#!e” portion), type in your reminder into the box and hit enter. An email will be sent to your email account with the reminder in the subject line. Note that the VBS script you downloaded first is configured to work with Gmail accounts but you can use it with other services by modifying the SMTP server configuration. Also, it would be wise to either encrypt the file or at least creating an extra email account just for sending these emails, since the password would be stored in plain text.

This is just scratching the surface of what AutoHotKey can do. You can find many helpful resources on their developer’s forum and around the Web. If you regularly use other scripts that you find useful, feel free to share them in the comments.

We’ll be on the lookout for more time-saving ideas to revisit this topic in the future. In the meantime you can download the aforementioned scripts in a single executable file here to run them without AutoHotKey installed.