Languages like
AutoHotkey can do this using the send command... All you have to do is read the
quick start and you'll have enough to do this with... Sounds like a game trainer or similar?
If you'd like some help i'll knock out a quick script for you, but you'll have to go as far as trying first =]
Cheers,
Jamey