API hooking with Autohotkey
Inspect the sample Msgbox Hook.ahk to learn how to use AhkHook. The source is well commented, including a reference for error checking
If you want to modify the code you will need this: https://github.com/HotKeyIt/_Struct
For support visit this thread: https://autohotkey.com/boards/viewtopic.php?f=6&t=9341