| View previous topic :: View next topic |
| Author |
Message |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Wed Jul 09, 2008 9:07 pm Post subject: Do I need CreateThread? |
|
|
Hello. I am making a bot that performs a bunch of things such as autoclick, auto skill and auto pot.
However, I would like all these processes to perform at the same time.. I have something like this that controls and such.
| Code: |
case WM_HOTKEY:
if (wParam == IDHotKey1) {
AutoPot();
}
if (wParam == IDHotKey2) {
AutoClicker ();
} |
With this code do the functions autopot and autoclicker at the same time? Or old one at a time? If one at a time, will I need to use CreateTjread?
Thanks
|
|
| Back to top |
|
 |
b6ooy Grandmaster Cheater
Reputation: 0
Joined: 21 Sep 2006 Posts: 653
|
Posted: Wed Jul 09, 2008 9:16 pm Post subject: |
|
|
edit: didn't understand the question well ..
Last edited by b6ooy on Wed Jul 09, 2008 9:25 pm; edited 1 time in total |
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Wed Jul 09, 2008 9:16 pm Post subject: |
|
|
use CreateThread and call it on the WM_HOTKEY
Example thread
| Code: |
void AutoClick() {
while(bExitAutoClick) {
PostMessageX(hwnd, Msg, wParam, lParam);
Sleep(20);
}
ExitThread(0);
}
|
Then CreateThread this function like this
| Code: |
WM_HOTKEY:
if( wParam == IDC_SEXKEY ) {
if( bExitAutoClick )
bExitAutoClick = FALSE;
if( !bExitAutoClick ) {
bExitAutoClick = TRUE;
CreateThread(...);
}
}
|
Sorry for the sloppy code i made it in here. bExitAutoClick = bool
_________________
|
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Wed Jul 09, 2008 9:18 pm Post subject: |
|
|
| blankrider wrote: | use CreateThread and call it on the WM_HOTKEY
Example thread
| Code: |
void AutoClick() {
while(bExitAutoClick) {
PostMessageX(hwnd, Msg, wParam, lParam);
Sleep(20);
}
ExitThread(0);
}
|
Then CreateThread this function like this
| Code: |
WM_HOTKEY:
if( wParam == IDC_SEXKEY ) {
if( bExitAutoClick )
bExitAutoClick = FALSE;
if( !bExitAutoClick ) {
bExitAutoClick = TRUE;
CreateThread(...);
}
}
|
Sorry for the sloppy code i made it in here. bExitAutoClick = bool |
Thanks! You are the best!
|
|
| Back to top |
|
 |
|