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 


[Help C++] Auto Chat

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Sharel972
Newbie cheater
Reputation: 0

Joined: 02 Nov 2009
Posts: 24
Location: israel

PostPosted: Wed Dec 09, 2009 2:18 pm    Post subject: [Help C++] Auto Chat Reply with quote

I'm trying to build auto chat will copy the text from EditBox paste it in the game.
How I do it?
Back to top
View user's profile Send private message MSN Messenger
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Wed Dec 09, 2009 2:21 pm    Post subject: Reply with quote

GetDlgItemText() + PostMessage()
Back to top
View user's profile Send private message
Sharel972
Newbie cheater
Reputation: 0

Joined: 02 Nov 2009
Posts: 24
Location: israel

PostPosted: Wed Dec 09, 2009 2:23 pm    Post subject: Reply with quote

can u give me an example code?
Back to top
View user's profile Send private message MSN Messenger
NoMercy
Master Cheater
Reputation: 1

Joined: 09 Feb 2009
Posts: 289

PostPosted: Wed Dec 09, 2009 2:57 pm    Post subject: Reply with quote

Sharel972 wrote:
can u give me an example code?


are u that coder for w8vip? i believe so,

well u could take a look at pro surf's source, it has it all
Back to top
View user's profile Send private message
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Wed Dec 09, 2009 7:07 pm    Post subject: Reply with quote

Use keybd_event.

Code:

#include <windows.h>

void SendMyMessage()
{
//Example code sending the message Hello
keybd_event(VkKeyScan("H"), 0xA3, 0, 0);
keybd_event(VkKeyScan("E"), 0x92, 0, 0);
keybd_event(VkKeyScan("L"), 0xA6, 0, 0);
keybd_event(VkKeyScan("L"), 0xA6, 0, 0);
keybd_event(VkKeyScan("A"), 0x9E, 0, 0);

keybd_event(VkKeyScan("H"), 0xA3, KEYEVENTF_KEYUP, 0);
keybd_event(VkKeyScan("E"), 0x92, KEYEVENTF_KEYUP, 0);
keybd_event(VkKeyScan("L"), 0xA6, KEYEVENTF_KEYUP, 0);
keybd_event(VkKeyScan("L"), 0xA6, KEYEVENTF_KEYUP, 0);
keybd_event(VkKeyScan("A"), 0x9E, KEYEVENTF_KEYUP, 0);
}


Last edited by iPromise on Thu Dec 10, 2009 5:07 pm; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Wed Dec 09, 2009 7:42 pm    Post subject: Reply with quote

iPromise wrote:
Use keybd_event.

Code:

#include <windows.h>

void SendMyMessage()
{
//Example code sending the message Hello
keybd_event(VkKeyScan("H"), 0xA3, 0, 0);
keybd_event(VkKeyScan("E"), 0x92, 0, 0);
keybd_event(VkKeyScan("L"), 0xA6, 0, 0);
keybd_event(VkKeyScan("L"), 0xA6, 0, 0);
keybd_event(VkKeyScan("A"), 0x9E, 0, 0);

keybd_event(VkKeyScan("H"), 0xA3, KEYEVENTF_KEYUP, 0);
keybd_event(VkKeyScan("E"), 0x92, KEYEVENTF_KEYUP, 0);
keybd_event(VkKeyScan("L"), 0xA6, KEYEVENTF_KEYUP, 0);
keybd_event(VkKeyScan("L"), 0xA6, KEYEVENTF_KEYUP, 0);
keybd_event(VkKeyScan("A"), 0x9E, KEYEVENTF_KEYUP, 0);
}


+Rep me.


ew, just build a nice array for SendInput() then do it in one shot if you're going to do it like this

and don't beg for rep.
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Thu Dec 10, 2009 7:09 am    Post subject: Reply with quote

I would suggest using an unhooked version of PostMessage();
I once messed around with an unhooked one called PostMessageX for MapleStory, worked fine.
Back to top
View user's profile Send private message
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Thu Dec 10, 2009 5:08 pm    Post subject: Reply with quote

@Slovach

Never begged man, just said give me +rep, implying if I helped you.
Back to top
View user's profile Send private message MSN Messenger
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sat Dec 12, 2009 11:16 am    Post subject: Reply with quote

Slugsnack wrote:
GetDlgItemText() + PostMessage()
If he's talking about MapleStory, there isn't a Dlg control for text, it's all drawn by DX. So the best way is to either hook the output chat handler or hook MapleStory's recv and filter out the packets.
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: Sat Dec 12, 2009 12:31 pm    Post subject: Reply with quote

&Vage wrote:
Slugsnack wrote:
GetDlgItemText() + PostMessage()
If he's talking about MapleStory, there isn't a Dlg control for text, it's all drawn by DX. So the best way is to either hook the output chat handler or hook MapleStory's recv and filter out the packets.




Sharel972 wrote:
I'm trying to build auto chat will copy the text from EditBox paste it in the game.
How I do it?



You dumb? He wants it copied from his own box.
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sun Dec 13, 2009 10:25 am    Post subject: Reply with quote

Code:
void __inline sendText(char * szBuf)
{
   for(int i = 0; i<=strlen(szBuf); i++)
   {
      PostMessage(hWnd, WM_KEYDOWN, szBuf[i], MapVirtualKey(szBuf[i], 0)<<16);
   }
}
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