In Runescape Jagex set up some software that could sniff out bots by checking for movement patterns that repeated exactly. No player playing the game organically will ever follow exactly the same path over and over. They did it without warning and set it to permanently ban them, and after that there weren't many bots.
Also, they set it up so the camera just randomly drifts very slowly. This makes recording a macro path impossible because you can never account for it; even though it's far too subtle to notice during gameplay while you're playing. Any bot would need to actually "watch" the game, a much more challenging hack to design which is less reliable once implemented.
This is just one idea, I realize it's not easy to implement. Bots aren't negatively impacting the gameplay for me; though I have seen them. An automated solution is necessary.