| View previous topic :: View next topic |
| Author |
Message |
Engineer Expert Cheater
Reputation: 1
Joined: 25 Nov 2007 Posts: 170
|
Posted: Tue Dec 25, 2007 9:53 am Post subject: [C++] Scrip for Clicks \ pressing things automatically? |
|
|
Im searching for some scrips that will auto-press \ auto-click by hotkeys in c++
i know basic-medium c++ language;
willing to give rep+ if possible
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Tue Dec 25, 2007 3:12 pm Post subject: |
|
|
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 |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Dec 25, 2007 4:42 pm Post subject: |
|
|
| 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.
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 |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
|
| Back to top |
|
 |
|