If you want to learn about scripting, go to the "Scripts Here" thread in the multiplayer strategies forum. It's quite a few pages long & has lots of examples.
You'll find the answer to your question there too. I explained how it could be done. It's very complicated though & not worth the effort, but it's a good learning tool.
Learning to script can be fun, but I still wouldn't recommend using complicated move scripts against real people. As was pointed out, they leave you open too much, & if you're doing a move that couldn't possibly be done without a script that's cheating & people will get pissed at you.