Skip to main content
GameDev.net gamedev.net
🔒 Locked

input simulation with directinput

Started by skewlboy Jan 6, 2005 at 1:44 PM 1 replies 2.1k views
Original Post
skewlboy
skewlboy
Hi, I'm trying to make something like a bot and I am currently using sendinput() but that stops me from using computer while it is running so I'd like to know if is there any other way to simulate input in directx like sendmessage(WM_MOUSEUP,...) and so (that I have tried and dont work for a game using directinput). Thank you
xsirxx
xsirxx
I dont work with bot stuff, so I may be off here. Let me understand, you are using input from a keyboard/mouse to control a bot? Why not just have the math run on its own thread in the background? Why is there a need for the bot to send keyboard/mouse strokes through directx? but if need be, goto msdn and look up pKeyboard->GetDeviceData() where pKeyboard is a LPDIRECTINPUTDEVICE8.
--X
skewlboy
skewlboy
No, I was not clear probably. I'm not using directx to make bot. I'm making a bot for a game using directinput. The game is not mine nor I have the source code. The "bot" is an independent application simulating input in game window.
The problem is that I am using sendinput() which sends general keyb and mouse events. sending WM_MOUSEUP and WM_MOUSEDOWN messages to game window is ignored by directinput. I was wondering if there are kind of messages I could use that would do the same thing and directinput wouldn't ignore. Or maybe another way, I don't know.

Thank you

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.