What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Send keys like Num0 to the game

dark wolf

New Member
Joined
Mar 11, 2015
Messages
95
Reaction score
2
Is ther a api for it? i could not find anything in the forum or the Documentation.
Did I miss it ?
Thanks
 
No, you'll have to hook into user32.dll and into the process

Code:
            [DllImport("user32.dll")]
            public static extern IntPtr PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);

Code:
                const uint WM_KEYDOWN = 0x100;
                const uint WM_KEYUP = 0x0101;
                IntPtr edit = Core.Memory.Process.MainWindowHandle;

                PostMessage(edit, WM_KEYDOWN, (IntPtr)(Keys.NumPad0), IntPtr.Zero);
                PostMessage(edit, WM_KEYUP, (IntPtr)(Keys.NumPad0), IntPtr.Zero);

something like that.
 
Back
Top