is this any help?

http://www.vbapi.com/ref/s/sendinput.html

I've not used it myself but it looks like it might be what you want