how simulate keyboard and mouse whilst in game?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ollie Shotton
    New Member
    • Jan 2011
    • 12

    how simulate keyboard and mouse whilst in game?

    hi i am trying to make a program that whilst ingame (magicka if anyone is interested) reads what is pressed on the keyboard and the simulates a combination of keyboard key down and keyboar key up and mouse press.

    eg if i press NumPad0 it would simulate Key Press A, Key Press S, Key Press F

    or if i press NumPad1 it would simulate Shift Down, LButton Press, Shift Up

    i have already managed to read what is pressed on the keyboard and know just need to know how to simulate pressing my combination

    i have read about DirectX's SendInput and other stuff but was wondering what is the best way to do this so the game will read what inputs i have pressed? and also if anyone has any good tutorials/help sites they can link me to!

    Thanks in advance =)
    Ollie
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    Sounds like hacks to me... :P

    But give this a try...


    It uses window messages, so it might not make it to a game, but it's a starting point. I'd be careful though, Valve Anti Cheat looks for hook programs so it might well detect you as a cheater and ban you from Steam.

    Comment

    • Ollie Shotton
      New Member
      • Jan 2011
      • 12

      #3
      okay just to let you know im not using it to cheat. it wont harm other peeps. it just making a hotkey type program so i can cast spells quicker, no different to programmable keys on special Razor and Logitech keyboards.

      thanks for your reply i will look at it know!! =)

      Comment

      • GaryTexmo
        Recognized Expert Top Contributor
        • Jul 2009
        • 1501

        #4
        I'm just buggin' ya. I've played it so I'm pretty sure I know exactly what you're getting at. I am serious about the VAC detection though. While you may not be intending to cheat, VAC might still detect the hook as a cheat.

        I'd be careful with this.

        Comment

        • Ollie Shotton
          New Member
          • Jan 2011
          • 12

          #5
          Okay thanks! If i go offline whilst playing will the vac still detect the hooks?!
          Or is there any way you know off getting around this?! This seems tobe getting more and more about cheating now!! Lol

          Comment

          • GaryTexmo
            Recognized Expert Top Contributor
            • Jul 2009
            • 1501

            #6
            I'm honestly not sure... the trouble is, if you get busted "cheating" it locks down your whole steam account. And it's not so much that you're cheating, it's that VAC thinks you are. It tries to detect when other programs are hooking into it. I think what I linked you is ok 'cause it's just listening to windows messages, but I wanted to warn you just in case.

            Comment

            • Ollie Shotton
              New Member
              • Jan 2011
              • 12

              #7
              Okay thanks for the heads up! I think i shuddering be okay, as u say important not hooking into the act program! Also don't some keyboards by razor and logitech etc have programmable keys but i suppose the driver just does what it normally does for any other key!

              Comment

              Working...