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 


Question about simulating keys

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Danielb
Cheater
Reputation: 0

Joined: 22 Jul 2007
Posts: 30

PostPosted: Tue Aug 30, 2011 5:01 pm    Post subject: Question about simulating keys Reply with quote

I am creating a bot that simulates keyboard actions (can not use sniffer). And I want him to work while not in the foreground.

Solution: PostMessage? ?

Sorry, bad English.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Tue Aug 30, 2011 6:44 pm    Post subject: Reply with quote

Depends on if the game doesn't already block input from PostMessage. You may need to hook some functions to bypass protections if thats the case.

If there isn't protection on the game then PostMessage will usually do the trick. If the game uses DirectInput you may need to use other means though.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Danielb
Cheater
Reputation: 0

Joined: 22 Jul 2007
Posts: 30

PostPosted: Tue Aug 30, 2011 7:13 pm    Post subject: Reply with quote

I think I found what I wanted. I'll look later.

http://www.vivid-abstractions.net/programming/tutorials/video-tutorial-send-keys-to-an-inactive-window-windows-messages/

Game is Tibia Shocked
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Wed Aug 31, 2011 1:51 am    Post subject: Reply with quote

SendMessage/PostMessage can be used to send windows messages which are usually generated by Windows. However you can't guarantee the window will respond as you wish to these messages. The only truly foolproof way is SendInput as is discussed here:
http://blogs.msdn.com/b/oldnewthing/archive/2005/05/30/423202.aspx
Back to top
View user's profile Send private message
Danielb
Cheater
Reputation: 0

Joined: 22 Jul 2007
Posts: 30

PostPosted: Fri Jun 07, 2013 7:53 am    Post subject: Reply with quote

Can anyone help me? I have a system that locks the post, need to use DirectInput (C #)
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