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 


[C++] Scrip for Clicks \ pressing things automatically?

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

Joined: 25 Nov 2007
Posts: 170

PostPosted: Tue Dec 25, 2007 9:53 am    Post subject: [C++] Scrip for Clicks \ pressing things automatically? Reply with quote

Im searching for some scrips that will auto-press \ auto-click by hotkeys in c++ Shocked

i know basic-medium c++ language;

willing to give rep+ if possible
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 Dec 25, 2007 3:12 pm    Post subject: Reply with quote

mouse_event is what you need for clicking. For auto-press, you have multiple options based on what the game/program will allow you to do.

As for key pressing, you have a few different options on what to use for that, but it depends on what your intended target will allow.

There are a few examples of using PostMessage in this section about sending key presses. (Most are in Delphi but you should be able to understand it enough to convert them.)

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Tue Dec 25, 2007 4:42 pm    Post subject: Reply with quote

Wiccaan wrote:
mouse_event is what you need for clicking. For auto-press, you have multiple options based on what the game/program will allow you to do.

As for key pressing, you have a few different options on what to use for that, but it depends on what your intended target will allow.

There are a few examples of using PostMessage in this section about sending key presses. (Most are in Delphi but you should be able to understand it enough to convert them.)


PostMessage won't work in many applications I've tried, or work strangely. I don't know how to quite explain it, but I tried it in CS and it seems to get the keystroke, but it's not like it was actually pressed. Confused

SendInput is probably your best bet. If the game / program uses DirectInput, it won't work anyway and you'll need to use that. There's a good example for SendInput somewhere at http://www.codeproject.com/ . Search it on that site and surely you'll come across it.
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 Dec 25, 2007 4:46 pm    Post subject: Reply with quote

slovach wrote:
PostMessage won't work in many applications I've tried, or work strangely. I don't know how to quite explain it, but I tried it in CS and it seems to get the keystroke, but it's not like it was actually pressed. Confused

SendInput is probably your best bet. If the game / program uses DirectInput, it won't work anyway and you'll need to use that. There's a good example for SendInput somewhere at http://www.codeproject.com/ . Search it on that site and surely you'll come across it.


Like I said, there are a number of options for sending key strokes to an application. And if it uses DirectInput, you should just hook it instead to get full control easily.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
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