AutoHotkey Happiness

  AutoHotkey logo by philou

AutoHotkey logo by philou

A while back, I briefly mentioned one of my favorite tools for keeping the smiley teacher face: AutoHotkey.

AHK is another powerful open-source software, like Audacity, that I use in the most simplistic and superficial way– and you can too!

In layperson’s terms, AutoHotkey allows you to connect an action to a key or series of key strokes on your keyboard.  It does this by making what is called a macro. It’s like ctrl+alt+delete, but you get to choose the keys and the actions to make your life easier. For instance, you hit ctrl+D+delete and your least favorite dean vanishes.  Okay, it won’t do that, but it will do other cool stuff.

I use AutoHotKey to respond to student digital work by inserting comments I find myself making often without having to type the whole comment. For example, I often encourage students to give example to help explain an idea. Rather than typing “Give an example” each time, I type “bge,” and the following appears:

Give examples from the text to support this idea– Gill

I assigned the series “bge” to the action as a mnemonic device to help me remember; “bge” means “bold, give example” in my  brain. Any series of characters could have been attached to the action; this one just makes sense to me. I scripted the text to appear in bold to draw attention to it within a digital document or webpage.  It could say anything, and it could be in any color, size, or font. The only real limit is your comfort and ability with its scripting language.

Yes, I did just write “scripting language,” but if you, like me, have little comfort or ability with scripting language, fear not — copy/paste is your friend (ctrl+V/ctrl+C).

After you download and install AutoHotkey, right-click anywhere on your desktop and choose “New” then “AutoHotkey Script.” Assuming you are working in some Microsoft environment (if you are hip enough to be running something in Linux, why are you reading this? If you have a Mac, like I do at home, you are out of luck),  Notepad will open with all this gobblety-guk in it:

; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <>
; Script Function:
;    Template script (you can customize this template by editing “ShellNew\Template.ahk” in your Windows folder)

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

Leave it there and add this to the bottom of it:

::bge:: ^b Give examples from the text to support this idea– Gill ^b

If you look closely, you can probably figure out what’s going on here. The keys inside the :: are the keystrokes that prompt the feedback message. The ^b makes the message bold, and the text is what appears.  Using this sample, you can just change the keys and the text to make any feedback or message you need. Voila! Now you can write a script!

Save the notepad file somewhere, and when you want to use it, doubleclick the file to start it. Then all you need to do is type your chosen keystrokes to make the messages appear. I keep a file of scripts on my desktop and turn them on when I know I am going to be giving feedback. They can be made to start automatically when your computer boots as well.

When you type the keys to trigger a message, the message will open in the top active window.  Thus you can have multiple windows open, but the message will default to the one that is active. I’ve used AutoHotKey in blogs, wikis, word-processing documents, and learning management systems.  I suspect it will work in any software that accepts text.

The program is far more powerful than this little trick I’ve shown, but I am just a dabbler. Check the website for good help and all the whizbang possibilities. Enjoy.

Author Gill Creel