0

Now, i've been trying to make a C++ program that physically presses the D or A key, I am still a beginner in C++ and most recent thing i've learned is while loops. Thanks for anyone that could help :)

I want to do this because in a game I play, you go idle then you get kicked out for being idle. Thats why I'm trying to do this.

Nerdroid
  • 13,398
  • 5
  • 58
  • 69
Gamer Elite
  • 5
  • 1
  • 4

1 Answers1

3

For Windows, I think this is achievable using the SendInput function to inject key presses into the target application.

You can find the API documentation here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms646310%28v=vs.85%29.aspx

See how to use sendinput function C++ for an explanation and a complete example of its use.

Community
  • 1
  • 1
trooper
  • 4,444
  • 5
  • 32
  • 32