 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Flabbergasted Expert Cheater
Reputation: 0
Joined: 11 Oct 2007 Posts: 231 Location: I have alzheimer's.
|
Posted: Sun Apr 06, 2008 10:29 pm Post subject: SOLVED |
|
|
Alright I used a different method. Thanks Moller! Thanks to Anden btw for the adkiller .
Last edited by Flabbergasted on Mon Apr 07, 2008 6:56 pm; edited 8 times in total |
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Sun Apr 06, 2008 11:27 pm Post subject: |
|
|
This is my code for launching MapleStory.
Use it if you like.
| Code: | procedure TfrmTools.btnStartMapleStoryClick(Sender: TObject);
var
Reg: TRegistry;
MSPath: String;
begin
Reg := TRegistry.Create;
Reg.Rootkey:= HKEY_LOCAL_MACHINE;
Reg.Openkey('SOFTWARE\Wizet\MapleStory\', FALSE);
MSPath := Reg.ReadString('ExecPath');
reg.Free;
MSpath := Concat(MSPath,'\MapleStory.exe');
ShellExecute(Handle, 'open', Pchar(MSpath), nil, nil, SW_SHOWNORMAL);
end; |
There aren't any Ad killer, but you can just put that in somehow.
|
|
| Back to top |
|
 |
Anden100 Grandmaster Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 668
|
Posted: Mon Apr 07, 2008 4:02 am Post subject: Re: Could someone help me with this delphi code? |
|
|
| Flabbergasted wrote: | It's trying to see if "AdKiller" is checked. If it is not it'll execute MapleStory without killing the ad, if it is then it'll execute MapleStory killing the ad. There's tons of mistakes in it, just don't know where to go about fixing them .
blue = goes through the registry looking for MapleStory's path and launching it
green = else, ifs
orange = kills ad
| Quote: | procedure TForm1.StartMapleStory1Click(Sender: TObject);
var
mKey : HKEY;
RecvBuf : pchar;
dwType, dwSize : DWORD;
begin
if AdKiller.Checked = 'False' then
begin
dwType := REG_SZ;
dwSize := 255;
RecvBuf := StrAlloc(MAX_PATH);
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, 'SOFTWARE\Wizet\MapleStory', 0, KEY_READ, mKey) <> ERROR_SUCCESS) then begin
ShowMessage('ERROR! OS Reports ' + IntToStr(GetLastError()));
end;
if (RegQueryValueEx(mKey, 'ExecPath', nil, @dwType, pbyte(RecvBuf), @dwSize) <> ERROR_SUCCESS) then begin
ShowMessage('ERROR! OS Reports ' + IntToStr(GetLastError()));
end;
if (RegCloseKey(mKey) <> ERROR_SUCCESS) then begin
ShowMessage('ERROR! OS Reports ' + IntToStr(GetLastError()));
else
begin
dwType := REG_SZ;
dwSize := 255;
RecvBuf := StrAlloc(MAX_PATH);
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, 'SOFTWARE\Wizet\MapleStory', 0, KEY_READ, mKey) <> ERROR_SUCCESS) then begin
ShowMessage('ERROR! OS Reports ' + IntToStr(GetLastError()));
end;
if (RegQueryValueEx(mKey, 'ExecPath', nil, @dwType, pbyte(RecvBuf), @dwSize) <> ERROR_SUCCESS) then begin
ShowMessage('ERROR! OS Reports ' + IntToStr(GetLastError()));
end;
if (RegCloseKey(mKey) <> ERROR_SUCCESS) then begin
ShowMessage('ERROR! OS Reports ' + IntToStr(GetLastError()));
postmessage(Add, WM_CLOSE, 0, 0); //close maplestory
end;
lstrcat(RecvBuf, '\MapleStory.exe');
ShellExecute(Cardinal(nil), 'open', RecvBuf, nil, nil, SW_RESTORE);
StrDispose(RecvBuf);
postmessage(Add, WM_CLOSE, 0, 0); //close maplestory
end; |
 |
1) I guess your "addkiller" is a checkbox, you might either need to add it to your form, the name could be rong, otherwise, just remove it and add it again...
2) Just change the line right before "else" to | Code: | | ShowMessage('ERROR! OS Reports ' + IntToStr(GetLastError())) |
3) You might need to add "Add: HWND" to your list of uses, and then you will need to find the window, using the findwindow function
4) I will need to see the rest of the source, to help you here...
|
|
| Back to top |
|
 |
|
|
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
|
|