AutoHotkey: Script Shortcuts, Mouse Clicks, More

April 1, 2008 – 9:00 am by Gabe Anderson | No Comments

Yesterday I downloaded a great little application that a coworker recommended: AutoHotkey. Similar to Texter or other utilities that allow you to assign keyboard shortcuts to input text strings, AutoHotkey does all that and more. And, unlike Texter, it works on Vista (and XP), and I haven’t run into the same little quirks that I’ve run into with Texter in the past (scripts would go missing, keyboard shortcuts wouldn’t work).

AutoHotkey

I’ve only just scratched the surface of what’s possible with AutoHotkey, which allows you to do things like the following:

  • “Automate almost anything by sending keystrokes and mouse clicks.”
  • “Create hotkeys for keyboard, joystick, and mouse.”
  • “Expand abbreviations as you type them. For example, typing ‘btw’ can automatically produce ‘by the way.'”

As just one example of how AutoHotkey goes beyond Texter, yesterday I created a shortcut to create my signature that I use in Outlook replies to customers (by default, I don’t have my sig appear in replies since there’s no reason to include it on internal responses to colleagues) — including bolding some of the text, which is not possible in other scripting apps I’ve used. So now I can just type Ctrl-Shift-S and get the following:

Gabe Anderson
Director of Customer Support
Articulate – Empowering Rapid E-Learning
www.articulate.com

Here’s how to get started with a simple example like this:

  1. Download & install AutoHotkey.
  2. Save & extract this zip file anywhere on your computer.
  3. Double-click the autohotkeys.ahk file. You’ll see this green “H” icon appear in your taskbar:

    autohotkeys icon

  4. Right-click the green “H” and select Edit This Script to edit the text to match your own signature (and create other text shortcuts as desired):

    Edit This Script

  5. Save & close the script file.
  6. Right-click the green “H” and select Reload This Script to load your changes (AutoHotkey will tell you if you have any syntax errors in your script):

    Reload This Script

  7. Reply to an email and test it out by typing Ctrl-Shift-S (or whatever hotkeys you chose).

The documentation includes lots of great examples so you can explore what else is possible, from launching applications to activating and manipulating windows.

Give it a shot and have fun! Remember: Less time using your mouse means more productivity.

By the way, you can create multiple scripts, each of which can run in its own instance in your task bar, or create one script file to contain all your goodies. Then you can set each one (or your one master script file) to launch at startup (drop a shortcut in your Start Menu\Programs\Startup folder — path will vary whether you’re on XP or Vista).

[ Subscribe to gabeanderson.com via email or RSS feed. ]

Post a Comment