Well, I'm afraid I don't know anything at all about AHK. Can you explain in words (rather than code) what you want an AppleScript to do, and I'll sure someone (maybe even me...) will be able to offer some advice.
I don't think that AppleScript is really the right thing to use. It's mostly used for automating things in other applications, rather than listening for key strokes.
Having said that, you might find this discussion interesting: