Files
wow/ddl/chm_output/com_fun/Open2.html
王鹏 33dc741fd9 add 硬件控制模块 (hardware_control.py) 并修复游戏状态扫描区域宽度
- 新增 wyhkm.dll 硬件盒子 COM 接口封装,支持键盘鼠标控制
- 修复 game_state_config.json 中 scan_region_width 过小导致截图越界的问题
- 添加鼠标路径录制器、硬件测试脚本等工具
- 更新多项配置默认值

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 12:15:00 +08:00

76 lines
4.2 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>Open2</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">名称</th>
<td class="name">Open2 打开设备</td>
</tr>
<tr>
<th>功能</th>
<td>打开无涯键鼠盒子,以便对它进行操作。不再操作设备时应该关闭设备,这样可以释放它占用的资源,要关闭设备使用<a href="Close.html">Close</a>。使用相对鼠标时注意相对鼠标和相对移动的区别当系统中屏幕或鼠标的设置发生变化时需要重新打开设备先关闭设备再打开设备。比如屏幕分辨率或屏幕DPI(缩放)变化、鼠标指针速度或&ldquo;提高指针精确度&rdquo;变化。</td>
</tr>
<tr>
<th>参数</th>
<td class="canshu">参数1 第一个设备ID32位整型数。使用<a href="SearchDevice2.html">SearchDevice</a>或者<a href="SearchDevice2.html">SearchDevice2</a>可以获得它。<br />
参数2 第二个设备ID32位整型数。使用<a href="SearchDevice2.html">SearchDevice</a>或者<a href="SearchDevice2.html">SearchDevice2</a>可以获得它。<br />
参数3 DPI模式32位整型数。用于设置鼠标移动<a href="MoveTo.html">MoveTo</a><a href="MoveR2.html">MoveR2</a>)和获得鼠标坐标(<a href="GetCursorPos.html">GetCursorPos</a><a href="GetCursorPos2.html">GetCursorPos2</a>时使用的坐标的DPI模式。系统为了支持程序界面缩放使用了不同坐标不同DPI模式对应不同坐标计算方式。DPI模式中的前三种都是windows系统中的模式可查微软资料了解详细内容后面几种是这三种模式的变化。可取值<br />
<table width="500" border="1" cellpadding="0" cellspacing="0">
<tr>
<th width="34" scope="col"><span class="thf"></span></th>
<th width="460" scope="col"><span class="thf">说明</span></th>
</tr>
<tr>
<td>0</td>
<td>每个显示器DPI感知此模式不受系统DPI设置和显示器DPI设置影响每个坐标与显示器像素是一一对应的windows系统从WIN8.1开始支持此模式WIN8.1以前等效于系统DPI感知。</td>
</tr>
<tr>
<td>1</td>
<td>系统DPI感知。在WIN8.1以前的系统中每个坐标与显示器像素是一一对应的在WIN8.1及WIN8.1以后的系统中由于每个显示器可以设置不同DPI每个坐标与显示器像素不总是一一对应关系如果只有一个显示器且开机、重启、注销重登录后没改过DPI每个坐标与显示器像素还是一一对应的。</td>
</tr>
<tr>
<td>2</td>
<td>无DPI感知进程没有处理DPI缩放时的状态。进程把系统DPI和显示器DPI当成是100%时的状态。缩放由系统处理明显看到的现象是如果DPI是100%时一切正常如果DPI不是100%此时会导致程序界面模糊。</td>
</tr>
<tr>
<td>3</td>
<td>DPI不可用这个模式的主要目的是不释放和执行DPI检测进程。在符合的条件下等效于每个显示器DPI感知在不符合的条件下DPI变换可能无法正常工作。符合的条件是在WIN8.1以前的系统中系统DPI是100%或者当前上下文的DPI感知是系统DPI感知在WIN8.1及WIN8.1以后的系统中所有显示器DPI是100%时或当前上下文的DPI感知是每个显示器DPI感知时可正常工作。</td>
</tr>
<tr>
<td>4</td>
<td>当前上下文的DPI感知。根据当前上下文决定DPI感知。</td>
</tr>
</table></td>
</tr>
<tr>
<th>返回值</th>
<td class="fanhui">布尔值。成功返回true失败返回false。WIN10以前的系统常见的失败原因是由于安全软件拦截或者系统权限问题导致DPI进程启动失败可以把参数3设置为3禁用模块对DPI的支持解决这个问题。</td>
</tr>
<tr>
<th>vbs<br />例子</th>
<td class="lizi">Dim DevId1,DevId2<br />
DevId1=wyhkm.SearchDevice(&amp;h1234&amp;,&amp;hABCD&amp;,2)<br />
If DevId1=-1 Then<br />
&nbsp;&nbsp;&nbsp;&nbsp;MsgBox &quot;未找到无涯键鼠盒子(键盘模式)&quot;,4096<br />
&nbsp;&nbsp;&nbsp;&nbsp;wscript.quit<br />
End If<br />
DevId2=wyhkm.SearchDevice(&amp;h1234&amp;,&amp;hABCD&amp;,3)<br />
If DevId2=-1 Then<br />
&nbsp;&nbsp;&nbsp;&nbsp;MsgBox &quot;未找到无涯键鼠盒子(鼠标模式)&quot;,4096<br />
&nbsp;&nbsp;&nbsp;&nbsp;wscript.quit<br />
End If <br />
If Not wyhkm.Open2(DevId1,DevId2,0) Then<br />
&nbsp;&nbsp;&nbsp;&nbsp;MsgBox &quot;打开无涯键鼠盒子失败&quot;,4096<br />
&nbsp;&nbsp;&nbsp;&nbsp;wscript.quit<br />
End If<br />
<span class="note">'执行操作</span><br />
wyhkm.Close</td>
</tr>
</table>
</body>
</html>