View previous topic :: View next topic |
Author |
Message |
DaNemeziz Master Cheater
Reputation: 0
Joined: 29 Sep 2007 Posts: 430
|
Posted: Sat Sep 06, 2008 3:17 pm Post subject: |
|
|
error in declerationsyntax
PostMessageX is no parameter
misses a ,
|
|
Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sat Sep 06, 2008 3:20 pm Post subject: |
|
|
Code: |
#include <windows.h>
#include <iostream>
using namespace std;
DWORD PMA = (DWORD)GetProcAddress(LoadLibrary("USER32.DLL"), "PostMessageA"));
_declspec(naked) BOOL PostMessageX(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) {
_asm {
mov edi, edi
push ebp
mov ebp, esp
jmp[PMA]
}
}
int main() {
int autoclicker;
while (true) {
if ((GetAsyncKeyState(0x71)<0)) {
autoclicker = 1;
cout << "started\n";
}
if ((GetAsyncKeyState(0x72)<0)) {
autoclicker = 0;
cout << "stopped\n";
}
if (autoclicker == 1) {
//left mouse click
}
Sleep(1);
}
}
|
_________________
8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
Back to top |
|
 |
DaNemeziz Master Cheater
Reputation: 0
Joined: 29 Sep 2007 Posts: 430
|
Posted: Sat Sep 06, 2008 3:34 pm Post subject: |
|
|
now i have 2 errors left...
error in decleration syntax
undefined '[' in function PostMessageX(HWND__ *,...
current source (added postmessage (sends "A" all the time o.o) (already works on private servers) to test)
Code: | #include "windows.h"
#include <iostream>
using namespace std;
DWORD PMA = (DWORD)GetProcAddress(LoadLibrary("USER32.DLL"),"PostMessageA"));
_declspec(naked) BOOL PostMessageX(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam) {
_asm {
mov edi,edi
push ebp
mov ebp,esp
jmp[PMA]
}
}
int main() {
while (true) {
HWND hWnd;
hWnd = FindWindow(NULL,"MapleStory");
PostMessage(hWnd,WM_CHAR,0x41,1);
Sleep(1);
}
}
|
|
|
Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sat Sep 06, 2008 5:34 pm Post subject: |
|
|
What compiler are you using?
_________________
8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
Back to top |
|
 |
&Vage Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Jul 2008 Posts: 1053
|
Posted: Sat Sep 06, 2008 7:02 pm Post subject: |
|
|
you can also do
Code: |
mov eax, PMA
jmp eax
|
|
|
Back to top |
|
 |
DaNemeziz Master Cheater
Reputation: 0
Joined: 29 Sep 2007 Posts: 430
|
Posted: Sun Sep 07, 2008 3:31 am Post subject: |
|
|
i found another bypass
Code: | LRESULT InjectMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
WNDPROC WndProc;
LRESULT lRET = 0;
WndProc = (WNDPROC)GetWindowLong(hWnd, GWL_WNDPROC);
if (WndProc != NULL)
lRET = CallWindowProc(WndProc, hWnd, uMsg, wParam, lParam);
return lRET;
} |
i just need to figure out what WndProc is now :p
|
|
Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Sun Sep 07, 2008 8:21 am Post subject: |
|
|
just a suggestion, dont just use sleep(1), it will use way to much memory, and there's no way programs will get all the clicks, try every tenth of a second, or twentieth
also, oib's code should work, tell us what the errors are and we'll try and help you
_________________
|
|
Back to top |
|
 |
kathyalex How do I cheat?
Reputation: 0
Joined: 22 Jan 2021 Posts: 2
|
Posted: Fri Jan 22, 2021 11:31 pm Post subject: Giving error |
|
|
Hey, thank you for the thread. I'm also learning c++ and I wanna make an auto clicker. I wanna use it for different games like Roblox and Minecraft. When I put code in compiler it says "windows.h" directory not found. Anyone can help me? I really wanna make an auto clicker but as I already told you I'm a beginner and don't know about these things.
|
|
Back to top |
|
 |
|