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 


PostMessage and lParam
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Mon Jan 07, 2008 12:26 pm    Post subject: Reply with quote

Because its the chat key, they didn't bothered blocking such a usless key. Rolling Eyes
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Mon Jan 07, 2008 12:50 pm    Post subject: Reply with quote

That is the hexidecimal code for uh... I think it was return. But anything will work if its VK_ Whatever.
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Mon Jan 07, 2008 12:56 pm    Post subject: Reply with quote

Try VK_Control ... Rolling Eyes
Back to top
View user's profile Send private message
Uzeil
Moderator
Reputation: 6

Joined: 21 Oct 2006
Posts: 2411

PostPosted: Mon Jan 07, 2008 1:24 pm    Post subject: Reply with quote

Define "blocked" and "keys"

If by "blocked" you mean "not blocked", then I can understand why you're requesting information on how to send it.

If by "keys" you mean "all keys being sent to something other than the chatbox", then I have more to work with.

Or are you just going on what appal/blank said, and don't actually know what you're asking?


Anyway... keys you're inputting to the game(like jumping, looting, etc - not the chat box) seem to be mapped. For instance, D(ord('D')) is actually going to emulate pressing D in game(can make you jump), but Z(ord('Z')) emulates pressing F in game(or maybe it was the other way around -- whatever Neutral ). It isn't that Z is blocked, but instead that you need to find another way to 'press' it with your messages.

_________________


Mini Engine v3.0
Mipla v1.0

Reposted old threads out of the MS section.
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Mon Jan 07, 2008 3:33 pm    Post subject: Reply with quote

What do you mean by
Uzeil wrote:
... instead that you need to find another way to 'press' it with your messages.


You mean like for CTRL:
VK_Return, $B, 11 ?
None of them work.
It's because the lParam like appalsap & blankrider said. (I think)
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Mon Jan 07, 2008 5:01 pm    Post subject: Reply with quote

Its PostMessageA isn't it???
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Mon Jan 07, 2008 5:05 pm    Post subject: Reply with quote

No, since I use the PMX.dll which exports PostMessageX which is the bypassed version from sphere90.
PostMessageA is patched/blocked by GG.
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Mon Jan 07, 2008 6:59 pm    Post subject: Reply with quote

PMX is still bloated. anddddddddddd it doesnt have a check for operating system for the hotpatch api header, (longest part in coding it was searching for various dll so i could see which versions had hotpatch api headers the rest took like 2 minutes i hardly see that as 1 hour.) and even w/ one more export its still exponentially smaller. anyways, uzeil is correct.
_________________
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Mon Jan 14, 2008 1:23 pm    Post subject: Reply with quote

So how could I send this:
Code:
    sendmessage(wnd,WM_LButtonDown,500,200);
    sendmessage(wnd,WM_LButtonUp,500,200);


To GGLES MapleStory?
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Mon Jan 14, 2008 1:45 pm    Post subject: Reply with quote

Timo, what are you trying to do ?

and why are you using HookHop.dll on ggless cleint ?
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Mon Jan 14, 2008 1:52 pm    Post subject: Reply with quote

I don't.
I only use it for normal MS client.
Back to top
View user's profile Send private message
SXGuy
I post too much
Reputation: 0

Joined: 19 Sep 2006
Posts: 3551

PostPosted: Mon Jan 14, 2008 4:16 pm    Post subject: Reply with quote

Rot1 wrote:
i'd recommend you to use (if you want) hookhop.dll by sponge, he invested 1 hour on it, i only 5min (was just for an example).

pmx.dll isn't working anymore i think

btw, i don't understand why MapleStoryClass and not MapleStory ?


Cos MapleStoryClass is the Classname and MapleStory is the window name Smile

_________________
Proud member of "The DACEF" (Distruction Against Criminal Egotistical Forces"

Sign up today and receive your free "I Hate x0r Badge"
Back to top
View user's profile Send private message
4ng3licDew
Cheater
Reputation: 0

Joined: 14 Feb 2008
Posts: 28

PostPosted: Fri Feb 15, 2008 1:11 am    Post subject: Reply with quote

Hi everyone,

This is my first post on Cheat Engine forum Very Happy

I have created my first auto click program for MapleStory Global, using Microsoft Visual Studio C++ 6.0, MFC, and hookHop.dll.

This program generates 't' key down events.

Here is what I did:

1. To load hookHop DLL into memory and obtain a function pointer to hhPostMessageA

Code:

// Function pointer type for hhPostMessageA in hookHop DLL
typedef int (__stdcall *HHPtr) (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
.
.
.
HINSTANCE m_hInst; // Instance of hookHop DLL
HHPtr m_phhPostMessageA; // Function pointer to hhPostMessageA
.
.
.
// Load hookHop DLL
m_hInst = ::LoadLibrary("hookHop.dll");

if (m_hInst != NULL) {
   // Get function pointer to hhPostMessageA
   m_phhPostMessageA = (HHPtr)GetProcAddress(m_hInst, "hhPostMessageA");
}



2. To unload hookHop DLL when AutoClick terminates

Code:

if (m_hInst != NULL) {
   // Un-Load hookHop DLL
   ::FreeLibrary(m_hInst);
   m_hInst = NULL;
}



3. To generate 't' key down event

Code:

HWND m_cHandle; // Windows handle to MapleStory
UINT scancode;
LPARAM lparam;
.
.
.
// Get window handle on MapleStory
m_cHandle = ::FindWindow("MapleStoryClass", NULL);

if ((m_cHandle != NULL) && (m_phhPostMessageA != NULL)) {

   // 0x54 is virtual key code for 't'
   scancode = MapVirtualKey(0x54, 0);

   // The scancode value is in the low 16 bits
   // need to shift it to the left 16 bits.
   // + 1 is the number of repetition.
   lparam = (scancode << 16) + 1;

   m_phhPostMessageA(m_cHandle, WM_KEYDOWN, NULL, lparam);

   // This call will only generate key press t in textboxes
   //m_pFunc(m_cHandle, WM_KEYDOWN, 0x54, NULL);

   // This call will generate key press t in both textboxes
   // and the graphic screen.
   //m_pFunc(m_cHandle, WM_KEYDOWN, 0x54, lparam);   
}



4. Adding hot key Control + F10 to toggle on or off auto click.

In AutoClickDlg.h
Code:

protected:
   UINT m_nIDHotKey; // Hot key identifier
.
.
.
   // Generated message map functions
   //{{AFX_MSG(CAutoClickDlg)
   .
   .
   .
   afx_msg LRESULT OnHotKey(WPARAM wp, LPARAM lp);
   .
   .
   .
   //}}AFX_MSG
   DECLARE_MESSAGE_MAP()



In AutoClickDlg.cpp
Code:

BEGIN_MESSAGE_MAP(CAutoClickDlg, CDialog)
   //{{AFX_MSG_MAP(CAutoClickDlg)
   .
   .
   .
   ON_MESSAGE(WM_HOTKEY, OnHotKey)
   .
   .
   .
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
.
.
.
BOOL CAutoClickDlg::OnInitDialog()
{
   CDialog::OnInitDialog();
.
.
.
   // Register "Ctrl + F11" as my hot key
   m_nIDHotKey = GlobalAddAtom("AutoClick");
   RegisterHotKey(m_hWnd, m_nIDHotKey, MOD_CONTROL, VK_F10);
.
.
.
}

LRESULT CAutoClickDlg::OnHotKey(WPARAM wp, LPARAM lp)
{
   if (wp == m_nIDHotKey) {
     
      // toggle timer on or off here   

   }
   return 0;
}



5. To create timer and timer callback

In AutoClickDlg.h
Code:

protected:
   int m_timer1on; // Flag indicating timer1 is on/off
   UINT ID_TIMER1; // Timer1 id
.
.
.
   // Generated message map functions
   //{{AFX_MSG(CAutoClickDlg)
   .
   .
   .
   afx_msg void OnTimer(UINT nIDEvent);
   .
   .
   .
   //}}AFX_MSG
   DECLARE_MESSAGE_MAP()



In AutoClickDlg.cpp
Code:

BEGIN_MESSAGE_MAP(CAutoClickDlg, CDialog)
   //{{AFX_MSG_MAP(CAutoClickDlg)
   .
   .
   .
   ON_WM_TIMER()
   .
   .
   .
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
.
.
.
BOOL CAutoClickDlg::OnInitDialog()
{
   CDialog::OnInitDialog();
.
.
.
   // Set flag timer on to false
   m_timer1on = 0;

   // Set timer1 id to 2
   ID_TIMER1 = 2;
.
.
.
}

LRESULT CAutoClickDlg::OnHotKey(WPARAM wp, LPARAM lp)
{
   if (wp == m_nIDHotKey) {
      
      if (m_timer1on == 0) {

         // Set timer1 flag to on
         m_timer1on = 1;

         // Create timer1
         SetTimer(ID_TIMER1, m_interval, NULL);

      } else {

         // Set timer1 flag to off
         m_timer1on = 0;

         // Destroy timer1
         KillTimer(ID_TIMER1);
      }
   }
   return 0;
}

void CAutoClickDlg::OnTimer(UINT nIDEvent)
{
   UINT scancode;
   LPARAM lparam;

   if(nIDEvent == ID_TIMER1) {
     
      // Send key down event here.

      // Skip the default call.
      return;
   }

   CDialog::OnTimer(nIDEvent);
}

void CAutoClickDlg::OnDestroy()
{
   CDialog::OnDestroy();
.   
.
.
   if (m_timer1on == 1) {
      // Destroy timer1
      KillTimer(ID_TIMER1);
   }
}



That is all there is to it.

I have attached the source code in this reply for all you programmers out there. Enjoy!



The Extension 'zip' was deactivated by an board admin, therefore this Attachment is not displayed.

Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Feb 15, 2008 4:42 am    Post subject: Reply with quote

@4ng3licDew: Impressive for a first post on these forums. Most of the time its someone begging for something or requesting something. But you used MFC ; ; you made baby Jesus cry a little.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Fri Feb 15, 2008 2:58 pm    Post subject: Reply with quote

i know, i was impressed too, then i saw MFC and was disapointed.

nice job tho Smile

_________________
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
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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