Searched www .mpgh.net/forum/showthread.php?t=191917 looks old
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.
Searched www .mpgh.net/forum/showthread.php?t=191917 looks old
Hi and thanks for your reply.
I have however, had zero luck with this library. The game just ignores it.
I've done some more poking around, and it looks like it should work with either DirectInput or something else that can simulate keyboard events on kernel level.
One thing I forgot to mention is that the game does receive input from mouse_event, so I am able to click around. And SendKeys only works when the chat is active.
try to old the game window active if you are using your sendkey method
if you still don't get into it just reply
Like I said, the sendkey function only works when sending keys to the game chat, it doesn't work on anything else. (Opening GUI, moving the character etc.)