Worldsong
Dummy’s Guide to AutoHotKey

How did I live without this?

Ever had a program or job that required pressing six keys every time to accomplish one thing?  AutoHotKey is the answer!  This well-known free utility lets you sets up “macros” - you hit one key, and it generates all those six key strokes for you.  (Mouse clicks are also supported).

Notice though that I didn’t say “easily lets you set up…”.  AutoHotKey is incredibly powerful - you can automate anything with it - and unfortunately the documentation is targeted at PhD’s wanting to control nuclear power stations with a Dvorak keyboard and a joystick.  So, here is a quick guide for the rest of us!

How It Works

Firstly you download and install the AutoHotKey utility, which runs in the background (you never directly interact with the program, which I found disconcerting at first).

Then you set up AutoHotKey scripts for your macros.  These are just text files with some instructions in them.  You give these an extension of .ahk, and when you want to run one, you doubleclick on it, AutoHotKey fires it up in the background, and a icon for it appears in your system tray (hovering over it shows the name of the script).  You can compile these into .exe’s (see below).

Writing Scripts

Your script starts with you identifying the key(s) and/or mouseclicks that will trigger the macro.  Basically you put the name of the key (see the full list of key names here), followed by ”::”.  The following would trigger your script whenever you hit the Enter key:

    Enter::

To show that the key is hit together with Ctrl, or Alt, Shift, or the Windows key, prefix it with one or more of these symbols:

    ^ Ctrl
    !   Alt
    +  Shift
    #  Windows key

Now start a new line (just for clarity, you could put this in one line).  Use the Send command to specify what keystrokes/mouseclicks your macro must generate.  Here is a simple script, where Control+Alt+S becomes a hotkey to type a signature (ensure that a window such as an editor or draft e-mail message is active before pressing the hotkey).  Here all the characters are sent literally except {Enter}, which simulates a press of the Enter key:

    ^!s::
    Send Sincerely,{Enter}John Smith
    return

This Send command would be the same as hitting a Control+C followed by an Alt+Tab followed by the string “pasted:” followed by a Control+V:

    Send Send ^c!{tab}pasted:^v

Slowing things down

Sometimes sending all your keystrokes one after the other instantly can go too quickly for Windows, especially if one of them is to open a dialogue box, which will take a fraction of a second to come up.  In this case, send your keys separately, separated by Sleep commands to put tiny pauses inbetween.  This script is triggered by clicking the right mouse button while holding down the Shift key, and generates the keystrokes to open an Insert dialogue box, paste in the contents of the clipboard, tab to the “ok” button, and press Enter:

    +LButton::
    Send +{Insert}
    Sleep 300
    Send ^V
    Sleep 100
    Send {Tab}
    Sleep 100
    Send {Enter}
    return

Compiling scripts into .exe files

To compile a script into a .exe file, simply right-click on the .ahk file in Windows Explorer, and choose the “Compile Script” option in the context menu that appears. You can now put the .exe file in your Startup folder if you choose so that it will automatically start when you fire up Windows.

Happy automating!

This is only a minute fraction of what you can do with AutoHotKey scripts…

See the documentation on the site for more.

Wonderful evening giving out all gifts to the children in our Concordia Kids Church

Wonderful evening giving out all gifts to the children in our Concordia Kids Church

With the boys at Carols by Candlelight

With the boys at Carols by Candlelight

“A Dent in the Universe”

Enjoyed a really interesting evening discussing life with Seton Bailey from F.I.L.M and Robert, Chris and Sabrina from the ITU in Geneva.

My first “Idea Workshop”

I’m running my first “Idea Workshop” for the Bandwidth Barn.

Over the next three days I will be teaching aspirant entrepreneurs how to find a great idea, refine it, and take it further.  Looking forward to sharing the magic!

What I’m Watching: “Super 8”

A bunch of kids in a small town in the 70’s set out to shoot a movie about zombies on Super 8 film - and end up uncovering something far more frightening…

With superb storytelling from writer/director JJ Abrams, the genius behind series like Lost, and great cinematography and performances by the young cast, this film holds your attention from start to finish (and don’t miss the closing credits!).

Watching the extra “The Dream Behind Super 8” was also very interesting: JJ Abrams talks about the Super 8 movies that he shot as a kid, as did the director of photography who was a neighbour friend, and how this led to them getting to know Steven Spielberg (who produced the movie) through his passion as well for making Super 8 shorts, and how the story evolved.  Fascinating…

Postscript: Want to create your own spectacular action sequences?  Check out this iPhone app from JJ Abrams’ production company Bad Robot

Celebrating Christmas at our Carol Service, made more wonderful by having lots of the kids from our Concordia Kids Church there as well (thanks to The Rock church and the Plett Christian School for lending us their buses).

Celebrating Christmas at our Carol Service, made more wonderful by having lots of the kids from our Concordia Kids Church there as well (thanks to The Rock church and the Plett Christian School for lending us their buses).

Enjoying the foam with the kids at our Sunday School end-of-year “foam party”

Enjoying the foam with the kids at our Sunday School end-of-year “foam party”

What I’m Listening To: “Joyous Celebration”

I heard this in a coffee shop in Cape Town and was blown away by the sheer jubilation of this South African gospel music:

I was intrigued to discover that “the Joyous concept has always been enigmatic to a lot of people because of its format. We have been referred to as a Gospel group or Gospel Choir. We prefer to be referred to as a Gospel Project or a Gospel Concept. The reason being that, the crew changes at least every two years.

The concept is basically created in such a way that performers are selected through an intense auditioning process, after which they attend music workshops. During these workshops they learn skills such as songwriting to performance. We then rehearse a repertoire for about two months. After that the crew is on the road for the whole year. Performers always sign a 1 year contract to be in the Project, although there will be some performers that will be with Joyous celebration for more than a year”.

A wonderful “concept” - and one that has proved very successful - many of their recordings have gone platinum!

Get a taste of their music and vibe on the Joyous Celebration site

I’m at Cape Town Entrepreneurship Week

I’m exhibiting at Cape Town Entrepreneurship Week this week, if you’re around please drop in and say hello.