The search function is quite handy, however, I still cannot seem to figure this out. I'm trying to write a little program that sends little daily messages from the server in the game Halo. I have this server and in order to send a message, you have to press 'T' to bring up the chat-box, then type your message, then press enter to send it.
I used the keybd_event function like so..
just to send the letter 'A' through.Code:keybd_event('T',0,0 , 0); keybd_event('T',0,KEYEVENTF_KEYUP , 0); keybd_event('A',0,0 , 0); keybd_event('A',0,KEYEVENTF_KEYUP , 0); keybd_event(VK_RETURN,0,0 , 0); keybd_event(VK_RETURN,0,KEYEVENTF_KEYUP , 0);
However, it won't bring up the chatbox and nothing happends in the end. If I press T manually in the game to bring it up, the rest executes fine. So, the problem is, using keybd_event function to press 'T' to bring up the chatbox doesn't work. Does it have to do with direct3d 9? Not that I want to go into this option, but could I force the asm function that brings up the chatbox? Would using SendInput() or SendMessage() do anything different for me?