Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Delphi] Non WPM memory editing?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
angerist
Grandmaster Cheater Supreme
Reputation: 0

Joined: 18 Jun 2007
Posts: 1011
Location: Australia.

PostPosted: Sun Jan 25, 2009 2:13 am    Post subject: [Delphi] Non WPM memory editing? Reply with quote

CHANGE OF SUBJECT

So I've been doing a little research. And i realized wpm doesn't work with maplestory so I've been told. Is a there another method I can use? Sorry i might be talking rubbish, I hope this makes sense.

_________________


Last edited by angerist on Sun Jan 25, 2009 3:26 am; edited 2 times in total
Back to top
View user's profile Send private message
FullyAwesome
I post too much
Reputation: 0

Joined: 05 Apr 2007
Posts: 4438
Location: Land Down Under

PostPosted: Sun Jan 25, 2009 2:29 am    Post subject: Reply with quote

that should be the hwnd for (i'm assuming) maplestory. MS is like any other variable, you have to declare it first, in this case using FindWindow to get the value.
_________________
Back to top
View user's profile Send private message MSN Messenger
smartz993
I post too much
Reputation: 2

Joined: 20 Jun 2006
Posts: 2013
Location: USA

PostPosted: Sun Jan 25, 2009 2:55 am    Post subject: Reply with quote

It might be a little inefficient, but you can just replace "MS" with "FindWindow('MapleStoryClass',0)"...

if you don't want to do that, then make a timer or a loop that tries to find Maple's window, and once found end the timer/loop and store the hWnd in a variable called MS.

Code:
var
MS: hwnd;



(Make it global.)
Back to top
View user's profile Send private message
angerist
Grandmaster Cheater Supreme
Reputation: 0

Joined: 18 Jun 2007
Posts: 1011
Location: Australia.

PostPosted: Sun Jan 25, 2009 2:57 am    Post subject: Reply with quote

OK THANKYOU IT WORKED Smile


CHANGE SUBJECT FROM HERE ON

_________________
Back to top
View user's profile Send private message
b6ooy
Grandmaster Cheater
Reputation: 0

Joined: 21 Sep 2006
Posts: 653

PostPosted: Sun Jan 25, 2009 3:23 am    Post subject: Reply with quote

angerist wrote:
I'm a real novice at this but. From what you've said I've come up with. But still continue to get an error.

Code:
procedure TForm2.AutoLootTimerTimer(Sender: TObject);
var
a: integer;
Begin
a:= MapVirtualKey($5A,0);
a:=a shl 16;
h:=FindWindowA('MapleStoryClass',nil);
hhPostMessageA(MS,WM_KEYDOWN,$5A,a); //notice, i changed "0" to our integer value "a"
hhPostMessageA(MS,WM_KEYUP,$5A,a);
end;



Code:
procedure TForm2.AutoLootTimerTimer(Sender: TObject);
var
a: integer;
MS: hwnd;
Begin
a:= MapVirtualKey($5A,0);
a:=a shl 16;
MS:=FindWindowA('MapleStoryClass',nil);
hhPostMessageA(MS,WM_KEYDOWN,$5A,a); //notice, i changed "0" to our integer value "a"
hhPostMessageA(MS,WM_KEYUP,$5A,a);
end;
Back to top
View user's profile Send private message
angerist
Grandmaster Cheater Supreme
Reputation: 0

Joined: 18 Jun 2007
Posts: 1011
Location: Australia.

PostPosted: Sun Jan 25, 2009 3:27 am    Post subject: Reply with quote

Oh that's nice. Thankyou. I think i figured a method out though. Im yet to test it so if it doesn't work I'll use yours.
_________________
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sun Jan 25, 2009 8:20 am    Post subject: Re: [Delphi] Non WPM memory editing? Reply with quote

angerist wrote:
CHANGE OF SUBJECT

So I've been doing a little research. And i realized wpm doesn't work with maplestory so I've been told. Is a there another method I can use? Sorry i might be talking rubbish, I hope this makes sense.


if your trying to readwrite memory, inject a dll.

use
var
a:pbytearray;
begin
a:=pointer(address);
a[0]:=firstbyte... etc
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Sun Jan 25, 2009 11:46 am    Post subject: Reply with quote

b6ooy wrote:
angerist wrote:
I'm a real novice at this but. From what you've said I've come up with. But still continue to get an error.

Code:
procedure TForm2.AutoLootTimerTimer(Sender: TObject);
var
a: integer;
Begin
a:= MapVirtualKey($5A,0);
a:=a shl 16;
h:=FindWindowA('MapleStoryClass',nil);
hhPostMessageA(MS,WM_KEYDOWN,$5A,a); //notice, i changed "0" to our integer value "a"
hhPostMessageA(MS,WM_KEYUP,$5A,a);
end;



Code:
procedure TForm2.AutoLootTimerTimer(Sender: TObject);
var
a: integer;
MS: hwnd;
Begin
a:= MapVirtualKey($5A,0);
a:=a shl 16;
MS:=FindWindowA('MapleStoryClass',nil);
hhPostMessageA(MS,WM_KEYDOWN,$5A,a); //notice, i changed "0" to our integer value "a"
hhPostMessageA(MS,WM_KEYUP,$5A,a);
end;


Meh wants kreditz! http://www.microsoft.com/programming-tutorials/52393-tutorial-how-make-autoclick-maplestory.html
Back to top
View user's profile Send private message
angerist
Grandmaster Cheater Supreme
Reputation: 0

Joined: 18 Jun 2007
Posts: 1011
Location: Australia.

PostPosted: Sun Jan 25, 2009 6:40 pm    Post subject: Reply with quote

Are you serious? I'm not releasing anything. Just gotta get better at Delphi before me and a friend start a Project.

Plus your code doesn't work in the first place. I ended up re writing it. Hence this thread. But thankyou. Your tut's are really helpfull. Not many delphi tuts around. On this subject.

@dnsi0, Alright I used this method and got "supertubi" working. Smile

_________________
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Mon Jan 26, 2009 1:39 am    Post subject: Reply with quote

angerist wrote:
Are you serious? I'm not releasing anything. Just gotta get better at Delphi before me and a friend start a Project.

Plus your code doesn't work in the first place. I ended up re writing it. Hence this thread. But thankyou. Your tut's are really helpfull. Not many delphi tuts around. On this subject.

@dnsi0, Alright I used this method and got "supertubi" working. Smile


My code works just fine, but it needs improvements!, its really slow..., MapVirtualKey and shl 16 should only be done once, and FindWindow should only be called once in a while
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Mon Jan 26, 2009 12:46 pm    Post subject: Reply with quote

FindWindow should also only be called once. Once you have the hWnd it is not gonna change lol.
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Mon Jan 26, 2009 2:19 pm    Post subject: Reply with quote

Slugsnack wrote:
FindWindow should also only be called once. Once you have the hWnd it is not gonna change lol.


But MS can be closed/reopened?
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Mon Jan 26, 2009 2:38 pm    Post subject: Reply with quote

So check if the handle to the process is still valid, if it is, then you don't need to call it again. What's so hard?
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Mon Jan 26, 2009 2:41 pm    Post subject: Reply with quote

slovach wrote:
So check if the handle to the process is still valid, if it is, then you don't need to call it again. What's so hard?

Ill just stay getting the HWND every time my Timer is enabled...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites