VB program help
I'm trying to write a vb6 app that sends key strokes to a game, (City of Heroes). All I want to do is activate some buff type powers with a timer in vb.
I use AppActivate to bring up the City of Heroes window and then send the key commands. This is where I'm having problems. If I have the focus in the chat box entry line then any commands that I send go in fine. But if it's not in the chat box, then nothing gets through. I need the focus outside the chat box so I can send commands like Alt+1, Alt+2, etc, to the game itself.
I've tried using SendKeys, keybd_event, and SendInput but all 3 will only send key strokes to the chat window. I'm guessing that the game uses directinput for anything other than the chat box. If that's the case, then from what I've read, there is no way to send keystrokes through directinput, you can only wait for them to be pressed.
Anyone have any ideas?
|