add 硬件控制模块 (hardware_control.py) 并修复游戏状态扫描区域宽度

- 新增 wyhkm.dll 硬件盒子 COM 接口封装,支持键盘鼠标控制
- 修复 game_state_config.json 中 scan_region_width 过小导致截图越界的问题
- 添加鼠标路径录制器、硬件测试脚本等工具
- 更新多项配置默认值

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
王鹏
2026-04-15 12:15:00 +08:00
parent b4de5278ed
commit 33dc741fd9
203 changed files with 12197 additions and 247 deletions

View File

@@ -0,0 +1,65 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>IsMouseButtonDown</title>
<link rel="stylesheet" type="text/css" href="css/help.css">
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="ts">
<tr>
<th width="50"><EFBFBD><EFBFBD><EFBFBD><EFBFBD></th>
<td class="name">IsMouseButtonDown <20>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD></td>
</tr>
<tr>
<th><EFBFBD><EFBFBD><EFBFBD><EFBFBD></th>
<td><EFBFBD>ж<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>¡<EFBFBD>ʹ<EFBFBD><EFBFBD><a href="Open.html">Open</a><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ſ<EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
</tr>
<tr>
<th><EFBFBD><EFBFBD><EFBFBD><EFBFBD></th>
<td class="canshu"><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>32λ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡֵ<EFBFBD><EFBFBD><EFBFBD>¡<EFBFBD><br />
<table width="133" border="1" cellpadding="0" cellspacing="0">
<tr>
<th width="49" scope="col"><span class="thf"><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></span></th>
<th width="78" scope="col"><span class="thf">˵<EFBFBD><EFBFBD></span></th>
</tr>
<tr>
<td>0</td>
<td><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></td>
</tr>
<tr>
<td>1</td>
<td><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҽ<EFBFBD></td>
</tr>
<tr>
<td>2</td>
<td><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD></td>
</tr>
</table></td>
</tr>
<tr>
<th><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ</th>
<td class="fanhui"><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD>true<EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD>»<EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܷ<EFBFBD><EFBFBD><EFBFBD>false<EFBFBD><EFBFBD></td>
</tr>
<tr>
<th>vbs<br /><EFBFBD><EFBFBD><EFBFBD><EFBFBD></th>
<td class="lizi">Dim DevId<br />
DevId=wyhkm.SearchDevice(&amp;h1234&amp;,&amp;hABCD&amp;,0)<br />
If DevId=-1 Then<br />
&nbsp;&nbsp;&nbsp;&nbsp;MsgBox &quot;δ<EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>&quot;,4096<br />
&nbsp;&nbsp;&nbsp;&nbsp;wscript.quit<br />
End If<br />
If Not wyhkm.Open(DevId,0) Then<br />
&nbsp;&nbsp;&nbsp;&nbsp;MsgBox &quot;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>&quot;,4096<br />
&nbsp;&nbsp;&nbsp;&nbsp;wscript.quit<br />
End If<br />
wyhkm.LeftDown<br />
MsgBox &quot;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬:&quot; &amp; CStr(wyhkm.IsMouseButtonDown(0))<br />
wyhkm.DelayRnd 90,120<br />
wyhkm.LeftUp<br />
MsgBox &quot;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬:&quot; &amp; CStr(wyhkm.IsMouseButtonDown(0)) <br />
wyhkm.Close</td>
</tr>
</table>
</body>
</html>