MacroGamer is built on AutoIT. After you record the necessary keys and the project is compiled into EXE, you will have the possibility to play the assigned key when it's pressed. For more information about the software, access the official website where you can also see YouTube videos and check for FAQs.
Official website: http://www.itoady.com/