This website works better with JavaScript
Home
Esplora
Aiuto
Registrati
Accedi
Home
/
repos_assist
Segui
1
Vota
0
Forka
0
File
Problemi
0
Pull Requests
0
Wiki
Nessuna descrizione
159
Commit
1
Rami (Branch)
0
Rilasci
Ramo (Branch):
master
Rami (Branch)
Tag
master
repos_assist
HTTP
SSH
ZIP
TAR.GZ
Jeff Wang
837e272838
添加新函数。
1 anno fa
AssistManager
68c07326f9
修复服务器使用sizeof()计算WriteFile的数据,导致客户端产生ERROR_MORE_DATA的问题。
2 anni fa
DLLInjection
568386afb2
非功能提交
2 anni fa
GameAssist
837e272838
添加新函数。
1 anno fa
gm
fbce84fd4d
交子唤神
1 anno fa
天使插件源码
81f7fc6db6
格式化代码。
2 anni fa
.gitignore
849022e6c8
忽略.vs文件夹,这个文件夹是由VS2019产生的。
4 anni fa
README.md
09108717eb
开始实际走
4 anni fa
commit.template
cf9f7a88d0
【模块名称】
3 anni fa
README.md
游戏辅助工具
第一代:基于模拟按键/鼠标、OCR、Opencv图像处理实现游戏辅助工具
一、模拟鼠标操作
SendMessage/PostMessage
移动鼠标:
SendMessage(hwnd, WM_MOUSEMOVE, MK_LBUTTON, MAKELPARAM(x, y));
单击鼠标:
SendMessage(hwnd, WM_LBUTTONDOWN, MK_LBUTTON, MAKELPARAM(x, y))
SendMessage(hwnd, WM_LBUTTONUP, MK_LBUTTON, MAKELPARAM(x, y));
注意:鼠标单击事件时,游戏窗口必须顶层,使用SetForegroundWindow(hwnd)切换窗口到顶层;
拖动鼠标:
目前遇到技术难点,实现方式不生效:
SendMessage(hwnd, WM_LBUTTONDOWN, MK_LBUTTON, MAKELPARAM(x, y));
SendMessage(hwnd, WM_MOUSEMOVE, 0, MAKELPARAM(x, y));
SendMessage(hwnd, WM_LBUTTONUP, 0, MAKELPARAM(x, y));
右键鼠标:
SendMessage(hwnd, WM_RBUTTONDOWN, MK_LBUTTON, MAKELPARAM(x, y))
SendMessage(hwnd, WM_RBUTTONUP, MK_LBUTTON, MAKELPARAM(x, y));
注意:鼠标单击事件时,游戏窗口必须顶层,使用SetForegroundWindow(hwnd)切换窗口到顶层;
mouse_event、key_event
移动鼠标:
mouse_event(MOUSEEVENTF_MOVE|MOUSEEVENTF_ABSOLUTE, x, y, 0, 0);
需要注意的是MOUSEEVENTF_ABSOLUTE宏是绝对坐标,如果没这个宏使用的是相对坐标,换算更麻烦,建议使用绝对坐标; 单击鼠标:
// 屏幕坐标,窗口坐标需要转成屏幕坐标;
POINT ptScreen = ptWnd;
ClientToScreen(&ptScreen);
// 窗口必须显示且位于顶层;
::ShowWindow(hWnd);
::SetForegroundWindow(hWnd);
// 在单击前,必须将鼠标位置设置在目标点上,否则无效;
::SetCursorPos(ptScreen.x, ptScreen.y);
mouse_event(MOUSEEVENTF_LEFTDOWN, ptScreen.x, ptScreen.y, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, ptScreen.x, ptScreen.y, 0, 0);
拖动鼠标:
// 屏幕坐标,窗口坐标需要转成屏幕坐标;
POINT ptSStart = ptWndStart;
POINT ptSEnd = ptWndEnd;
ClientToScreen(&ptScreen);
ClientToScreen(&ptSEnd);
// 窗口必须显示且位于顶层;
::ShowWindow(hWnd);
::SetForegroundWindow(hWnd);
// 在单击前,必须将鼠标位置设置在目标点上,否则无效;
::SetCursorPos(ptScreen.x, ptScreen.y);
mouse_event(MOUSEEVENTF_LEFTDOWN, ptScreen.x, ptScreen.y, 0, 0);
mouse_event(MOUSEEVENTF_MOVE|MOUSEEVENTF_ABSOLUTE, ptSEnd.x, ptSEnd.y, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, ptSEnd.x, ptSEnd.y, 0, 0);
右键鼠标:
// 屏幕坐标,窗口坐标需要转成屏幕坐标;
POINT ptScreen = ptWnd;
ClientToScreen(&ptScreen);
// 窗口必须显示且位于顶层;
::ShowWindow(hWnd);
::SetForegroundWindow(hWnd);
// 在单击前,必须将鼠标位置设置在目标点上,否则无效;
::SetCursorPos(ptScreen.x, ptScreen.y);
mouse_event(MOUSEEVENTF_REFTDOWN, ptScreen.x, ptScreen.y, 0, 0);
mouse_event(MOUSEEVENTF_REFTUP, ptScreen.x, ptScreen.y, 0, 0);
二、游戏截图与图像处理
1、GDI截图
2、DDRAW截图
3、DXGI截图
4、OCR-在线百度ORC
5、图像处理-Opencv
三、指令
类型:鼠标指令
单击、右击、双击、移动、拖动;参数=目标点
类型:剪切板指令
设置字符串;参数=字符串
类型:键盘指令
按键:Ctrl/Alt/Shift + key
粘贴;
类型:图像处理指令
模板匹配
类型:百度OCR
文字识别