Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sending input to games

Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
How do I cheat?
Reputation: 0

Joined: 15 May 2017
Posts: 1

PostPosted: Mon May 15, 2017 6:32 am    Post subject: Sending input to games Reply with quote

Alright, I'm using C++ and my end goal is a bot that can make some decisions. Currently, I'm having a couple a couple issues with sending inputs to other programs, including games. I've been using SendInput() to send a letter or two to notepad, but an issue I'm having with that is I can't hold down a key. Another issue with SendInput is I can't send an input at all to Terraria, while I can to Notepad. I'm assuming it's because Terraria's input handling that ignores SendInput, and if not, I'm under the impression that I'll eventually run in to that issue regardless if I try to port my bot to another game.

Sooo, I'm looking for help with simulating holding a key down, various other keyboard events, and mouse events and making it indistinguishable from the physical action itself. Thanks for your time.

Edit : I've tried using DIK key codes from dinput.h, but they don't work either. I even print out the return value and it always says it was sent. I'm going to try elevating user permissions on my program as soon as I figure out how and I'll report on how that goes. --Edit2: Ok, I elevated permissions (via Properties - Security) and it still don't work.

Edit3: I've done a little bit more reading on it and I think the best solution is going to be developing or utilizing a pre-existing Virtual Driver to handle keyboard and mouse events from my program. Anywhere I should start with looking in to that?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites