I've been using SikuliX [1] instead of AHK for a while now, only downside is that it uses jython so it's stuck on 2.7, but I don't use it for anything complicated enough that it really matters. Also I mainly use it for long running, rarely used automation, so I'm not sure how it would compare in terms of responsiveness for tasks like text expansion.
Also I did a quick search and I assume this [2] is the library you mentioned?
Github for the project: https://github.com/RaiMan/SikuliX1
It seems to have most of the content as the main site (which is down ATM).
SikuliX [1] perhaps? It's an image-based automation tool.