I wish. Perhaps there is, but I remember from back when I did the research on what was possible, you're quite limited since you can't really affect or simulate player inputs.
You can only code the state of the character.
Perhaps wube can give this a thought in the future, and open up some more API:s.