The current situation is, that the Mods don't give a clear answer on whether AHK or anything that does the same is legal or not. They just say: "It might get you banned", but apparently not always. The "1-input-1-output"-rule is not official, but it seems that using the 1:1-rule and only relative mouse movements keeps you relatively safe.
Now, it's possible to actually get quite creative with AHK. Here some of the scripts I've seen, or made myself:
Cooking Karambwan
Karambwan cooking only takes 1 tick (in opposite to other foods that take 3 at fastest, if you 3-tick cook them). By clicking Karambwan -> Fire -> "Cook one" and repeat, you can cook a Karambwan every game tick. Only possible with AHK because of extreme mouse speeds, also it will give your hand cancer. Still, up to 900k cooking XP/h. Also, it really depends on your ping. My personal best was 400k XP/h (by hand though).
Cleaning herbs
I read about this one on Reddit, but I can easily vouch that this is actually possible, because I had an AHK script similar to this a longer while ago. Basically, cleaning herbs with AHK can yield up to 300-400k XP/h, even with decent profit.
Downsides: Hand cancer, GE limits and price fluctuation of herbs.
Fletching darts
Similar to cleaning herbs, but a much simpler script. XP-Rates go up to 3M XP/h, I even remember there being a video from Zezima (the real one) doing it on OSRS. Downsides: Hand cancer, GE limits, very expensive.
Vengeance
This one is not skill related, but it's extremely overpowered in PvP. Basically, you make an AHK script so that if you press a series of keys, your character will veng (can be done with 5 keys if you want to have your mouse position reset). Can pull the most extreme and unexpected kills, I don't even like to use it because it feels like cheating. But I just wanted to test if it's possible.
I wouldn't encourage anyone to actually abuse / use AHK scripts that could be considered unfair, I just liked to test, what would be theoretically possible with this. Post if you have any other ideas. Will update if I come up with more