see these Win32 API1. SetWindowsHookEx //hook the keyboard and mouse message 2. GetCursor //get the position of the mouse 3. SetCursor //set the position of the mouse 4. mouse_event //perform mouse event 5. SendInput //perform keyboard eventthat's enough...
sorry for my mistake...should be2. GetCursorPos 3. SetCursorPos
用钩子
我就怀疑 按键精灵不是简简单单得加了api钩子就完事了.
2. GetCursor //get the position of the mouse
3. SetCursor //set the position of the mouse
4. mouse_event //perform mouse event
5. SendInput //perform keyboard eventthat's enough...
3. SetCursorPos
不知道游戏是屏蔽了 KB_EVNET 或是SENDKEYS, 还是屏蔽了setwindowshookEx . 反正自己用这种方法写的程序 得不到游戏中的键盘输入消息.....(可恨的是...游戏在最近一次更新才屏蔽的,之前都可以用) 上面的都变得不可用. 请教....