| View previous topic :: View next topic |
| Author |
Message |
TehBlue Newbie cheater
Reputation: 0
Joined: 14 Jul 2008 Posts: 10
|
Posted: Tue Nov 18, 2008 4:17 pm Post subject: Auto Clicker crashes |
|
|
Im makeing a simple auto clicker but once i press the hotkey to start it the auto clicker crashes. heres the code:
| Code: |
if(GetAsyncKeyState(VK_F11) && AC == false){
AC = true;
cout << "AC on\n";
while( AC == true ){
HWND msWin = FindWindow( L"MapleStoryClass", NULL );
PostMessageX(msWin, WM_LBUTTONDOWN, NULL, NULL );
PostMessageX(msWin, WM_LBUTTONUP, NULL, NULL );
Sleep(250);
if(GetAsyncKeyState(VK_F12)){
AC = false;
cout << "AC off\n";
break;
}
} |
Does anyone know whats wrong?
Last edited by TehBlue on Tue Nov 18, 2008 4:20 pm; edited 1 time in total |
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Nov 18, 2008 4:20 pm Post subject: |
|
|
Well first off you need a wParam+lParam for your PostMessageX. If you want to click where the mouse is, try using GetCursorPos and fill in a POINT structure and put the x/y into the LOWORD and HIWORD of lParam respectively.
I have a feeling there is something else fundamentally wrong though since it crashes. I can't help any further though since I don't code C++. |
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Tue Nov 18, 2008 4:24 pm Post subject: |
|
|
HWND msWin = FindWindow( L"MapleStoryClass", NULL );
WHY DO PEOPLE DO THIS IN A LOOP? |
|
| Back to top |
|
 |
GMZorita Grandmaster Cheater Supreme
Reputation: 0
Joined: 21 Mar 2007 Posts: 1361
|
Posted: Tue Nov 18, 2008 4:48 pm Post subject: |
|
|
| noz3001 wrote: | HWND msWin = FindWindow( L"MapleStoryClass", NULL );
WHY DO PEOPLE DO THIS IN A LOOP? |
Cuz they dont care about performance, they just want it to work :?
And most of them don't even know why it would make any diff outside the loop. _________________
Gone |
|
| Back to top |
|
 |
|