DirectInput - Sending keys to external window
Hello,
For the past few days I've been trying to send keys to an external application. This app happens to be a game. Ideally I would like to be able to send keys (control my character) with the game window minimized.
First I started with SendKeys - failed miserably.
Next I tried SendMessage / Event - Still nothing.
Last but not least I tried keybd_event - yet another kick in the nuts.
After some more "research" I came to the conclusion that my only real option would be DirectInput as the game seems to be protected against simulated keyboard/ mouse events.
But, I'm apparently too stupid to figure this thing out and trust me, I tried.
So my question to you is: How in the hell does this work, and how would I go about using it to send keyboard events to the app?
I'm not asking you to do all the dirty work, I'm just asking you to push me off the right cliff.
Thanks.
For the past few days I've been trying to send keys to an external application. This app happens to be a game. Ideally I would like to be able to send keys (control my character) with the game window minimized.
First I started with SendKeys - failed miserably.
Next I tried SendMessage / Event - Still nothing.
Last but not least I tried keybd_event - yet another kick in the nuts.
After some more "research" I came to the conclusion that my only real option would be DirectInput as the game seems to be protected against simulated keyboard/ mouse events.
But, I'm apparently too stupid to figure this thing out and trust me, I tried.
So my question to you is: How in the hell does this work, and how would I go about using it to send keyboard events to the app?
I'm not asking you to do all the dirty work, I'm just asking you to push me off the right cliff.
Thanks.
