No need for scripts, I just use the default keybinds in the game. You can assign 2 keys to each so I just add an extra custom one.

I just did the following changes:
- on all 3 alts, remove the WASD keybinds (or add them to the 'do not transmit' list instead)
- on my priest I added the F key as a keybind for moving forward
- on mage no1 I added the F key as a keybind for moving left
- on mage no2 I added the F key as a keybind for moving right
- on main you can unbind the F key or bind it to an action you want him to do in this scenario

So, in effect, when I'm on my pally and pressing the F key, the 3 alts will each move in a different direction.
I use Keyclone and the F key gets transmitted to each wow instance, but each has a different result based on what is binded to it.

I haven't tried AHK, but I'm sure it would be easy to do as it's just sending the same key press to each window and using the in-game bindings.