Ok i want to make a simple background clicker to a game called MUOnline (don't laugh here :P).
I have managed to do that but my problem is that to be able to send the clicks to the client
i have to send WM_ACTIVATE first in order for the simulated clicks to work...The clicker works fine
but when i am at background (ex. firefox) all the keystrokes i press the are also passed to the client!
That means the character is doing other things then he is expected..Although i have Spy++ all the actions
of the game if i simulate them with sendmessage the problem still remains!
Here is the code i use:
anyone had any similar problem with WM_ACTIVATE ?
I have managed to do that but my problem is that to be able to send the clicks to the client
i have to send WM_ACTIVATE first in order for the simulated clicks to work...The clicker works fine
but when i am at background (ex. firefox) all the keystrokes i press the are also passed to the client!
That means the character is doing other things then he is expected..Although i have Spy++ all the actions
of the game if i simulate them with sendmessage the problem still remains!
Here is the code i use:
Code:
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Private Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal Msg As UInteger, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr
End Function
<System.Runtime.InteropServices.DllImport("USER32.DLL", CharSet:=System.Runtime.InteropServices.CharSet.Auto)> _
Private Shared Function FindWindow(ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
End Function
Dim MUhwnd As IntPtr = FindWindow("MU", Nothing)
SendMessage(MUhwnd , WM_ACTIVATE, WA_CLICKACTIVE, 0)
SendMessage(MUhwnd , WM_RBUTTONDOWN, 0, (46UI << 16) Or 18UI)