Results 1 to 5 of 5
  1. #1
    SallyMcSaggyTits's Avatar
    Join Date
    Dec 2015
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0

    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.

  2. #2
    uhacker188's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    1
    Searched www .mpgh.net/forum/showthread.php?t=191917 looks old

  3. #3
    SallyMcSaggyTits's Avatar
    Join Date
    Dec 2015
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by uhacker188 View Post
    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.

  4. #4
    RoPMadM's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Location
    __asm
    Posts
    226
    Reputation
    12
    Thanks
    251
    My Mood
    Cynical
    try to old the game window active if you are using your sendkey method
    if you still don't get into it just reply

  5. #5
    SallyMcSaggyTits's Avatar
    Join Date
    Dec 2015
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    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.)

Similar Threads

  1. [Help] Send Keys to Game with DirectInput Hook
    By samet236 in forum C++/C Programming
    Replies: 1
    Last Post: 08-08-2015, 05:05 AM
  2. Sending keys to minimized windows
    By stupidname1 in forum Vindictus Help
    Replies: 5
    Last Post: 07-05-2011, 04:47 AM
  3. Send Key/Mouse to crossfire?
    By HackManster in forum Visual Basic Programming
    Replies: 20
    Last Post: 01-30-2010, 12:27 PM
  4. [Help] Send Key/Mouse movements to crossfire?
    By HackManster in forum CrossFire Hacks & Cheats
    Replies: 16
    Last Post: 01-28-2010, 03:11 PM
  5. Help with sending keys
    By Crash in forum C++/C Programming
    Replies: 4
    Last Post: 11-23-2009, 07:48 AM