I played with Auto Hotkey (AHK) recently as I wanted to add a layer to my keyboard. Wow, what powerful software! But I really disliked the scripting language and wished they'd used a standard language.
I ended up installing TouchCursor [1] which did everything I need at present, but will persevere with AHK.