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 


can PostMessage post a string?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Thu Feb 26, 2009 12:19 am    Post subject: can PostMessage post a string? Reply with quote

im making my personal autologin in c++ for Maplestory...
Rather than posting each letter individually, (using PostMessage) can I just post a whole string?

If yes, how so?
If not..is there a better api to do this?

_________________
Back to top
View user's profile Send private message
smartz993
I post too much
Reputation: 2

Joined: 20 Jun 2006
Posts: 2013
Location: USA

PostPosted: Thu Feb 26, 2009 12:40 am    Post subject: Re: can PostMessage post a string? Reply with quote

manc wrote:
im making my personal autologin in c++ for Maplestory...
Rather than posting each letter individually, (using PostMessage) can I just post a whole string?

If yes, how so?
If not..is there a better api to do this?


With WM_KEYDOWN ? no.

Uhh..find a handle to maple's editboxes for username+password using FindWindowEx on the main window, then send the WM_SETTEXT message using PostMessage.

Alternatively, send a login packet. (the login packet contains username and password, then there is a pin packet, but that includes AccountID so you would need to hook to grab the ID)
Back to top
View user's profile Send private message
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Thu Feb 26, 2009 12:47 am    Post subject: Re: can PostMessage post a string? Reply with quote

smartz993 wrote:

Uhh..find a handle to maple's editboxes for username+password using FindWindowEx on the main window, then send the WM_SETTEXT message using PostMessage.


Awesome. Thanks

_________________


Last edited by manc on Thu Feb 26, 2009 1:27 am; edited 1 time in total
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Thu Feb 26, 2009 1:25 am    Post subject: Reply with quote

Re-read that response... he told you how.
Back to top
View user's profile Send private message
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Thu Feb 26, 2009 1:27 am    Post subject: Reply with quote

Wow I completely overlooked that somehow. Thanks.
_________________
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Thu Feb 26, 2009 1:37 pm    Post subject: Re: can PostMessage post a string? Reply with quote

smartz993 wrote:
Uhh..find a handle to maple's editboxes for username+password using FindWindowEx on the main window, then send the WM_SETTEXT message using PostMessage.


Im not sure, but i dont think the Editboxes in MS login screen got a handle
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Thu Feb 26, 2009 5:41 pm    Post subject: Reply with quote

But you have to click it first. and yea like Irwin said just loop through each character and send a WM_CHAR message and it will work.
Back to top
View user's profile Send private message
smartz993
I post too much
Reputation: 2

Joined: 20 Jun 2006
Posts: 2013
Location: USA

PostPosted: Thu Feb 26, 2009 6:51 pm    Post subject: Reply with quote

You're stupid Irwin.

Looping through the characters is less efficient than the way i showed, and you will still need to click the next box or send a tab. (i think that's what dnsi0 was talking about)
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Thu Feb 26, 2009 8:32 pm    Post subject: Reply with quote

Well... For my auto login, I just made it so that it clicks the username box, then the password box then the login button. Then Send WM_CHAR messages for the pin, surprisingly the box asking for pin didn't popup yay... then it selects all the stuff...
Back to top
View user's profile Send private message
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Thu Feb 26, 2009 8:45 pm    Post subject: Reply with quote

Am I suppose to call it like this?
Code:
SendString( hWnd, lpcszMessage , 0);

I don't know what goes in for lpszMessage

and dnsi0, how exactly did you send numbers for your pin without first activating pin typer?

_________________
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Thu Feb 26, 2009 8:50 pm    Post subject: Reply with quote

just send WM_CHAR and using the pin. It doesn't bring up the pin typer but just goes into the pin area. So you can type letters in there too XD.
Back to top
View user's profile Send private message
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Thu Feb 26, 2009 8:58 pm    Post subject: Reply with quote

WM_CHAR with postmessage?
_________________
Back to top
View user's profile Send private message
AlbanainRetard
Master Cheater
Reputation: 0

Joined: 02 Nov 2008
Posts: 494
Location: Canada eh?

PostPosted: Thu Feb 26, 2009 10:23 pm    Post subject: Reply with quote

Spaming WM_CHAR is the best and simplest way, Irwin is right.
_________________
Back to top
View user's profile Send private message Send e-mail
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Thu Feb 26, 2009 10:49 pm    Post subject: Reply with quote

AlbanainRetard wrote:
Spaming WM_CHAR is the best and simplest way, Irwin is right.


I really dont understand what you guys are talking about, you keep saying "spam with WM_CHAR", but which function am I even supposed to be using it in? PostMessage? SendMessage?

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

Joined: 08 Aug 2006
Posts: 929

PostPosted: Thu Feb 26, 2009 10:56 pm    Post subject: Reply with quote

WM_CHAR is a parameter that can be used in PostMessage.

char* SendText = "hi im kool";

for( int i = 0; i <= strlen( SendText ); i++ )
PostMessage( HWND, WM_CHAR, SendText[i], 0 );

basically, this is postmessaging each letter one by one from SendText.
Back to top
View user's profile Send private message AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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