Automating Linux (Like AutoHotKey for windows)

Solution 1:

AutoKey can do everything you're asking for. You can find it in the Ubuntu Software Centre.