YYPOST群发软件 发表于 2025-2-26 08:00:26

AIWROK软件随机位置范围点击和范围随机拖动

<p></p><div><br></div><div><table cellspacing="0" cellpadding="0" border="0" style="table-layout: fixed; width: 757px; font-family: &quot;Microsoft YaHei&quot;, Tahoma, Helvetica, SimSun, sans-serif;"><tbody><tr><td width="40"><img height="40" src="http://www.postbbs.com/source/plugin/qzom_thread/image/thread_C.gif" width="40"></td></tr><tr><td valign="top" background="http://www.postbbs.com/source/plugin/qzom_thread/image/thread_D.gif"><img src="http://www.postbbs.com/source/plugin/qzom_thread/image/thread_left.gif" height="80" width="40" valign="0"></td><td background="http://www.postbbs.com/source/plugin/qzom_thread/image/thread_E.gif"><div class="t_f"><table cellspacing="0" cellpadding="0" style="table-layout: fixed; width: 979px; font-family: Tahoma, &quot;Microsoft Yahei&quot;, Simsun; font-size: 12px;"><tbody><tr><td class="t_f" id="postmessage_334" style="font-size: 14px; line-height: 24px;"><p style="font-family: &quot;Lucida Grande&quot;, Geneva, Verdana, Arial; font-size: 12px;"></p><div><ignore_js_op><ignore_js_op>&nbsp;</ignore_js_op>&nbsp;</ignore_js_op><ignore_js_op>&nbsp;<ignore_js_op>&nbsp;</ignore_js_op>&nbsp;</ignore_js_op><ignore_js_op>&nbsp;<ignore_js_op>&nbsp;</ignore_js_op>&nbsp;</ignore_js_op><ignore_js_op>&nbsp;<ignore_js_op></ignore_js_op></ignore_js_op><br></div><div><br></div><div><pre style="overflow-wrap: normal; box-sizing: border-box; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-stretch: normal; font-size: 12px; line-height: 1.6; font-family: &quot;YaHei Consolas Hybrid&quot;, Consolas, &quot;Meiryo UI&quot;, &quot;Malgun Gothic&quot;, &quot;Segoe UI&quot;, &quot;Trebuchet MS&quot;, Helvetica, monospace, monospace; margin-bottom: 1.5em; padding: 1em; overflow: auto; background: rgb(56, 69, 72); border-radius: 4px; border: 1px solid rgb(221, 221, 221); position: relative; color: rgb(209, 210, 210);"><code class="hljs php" style="overflow-wrap: normal; box-sizing: border-box; background: 0px 0px transparent; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; border-radius: 3px; border: 0px; word-break: normal; display: block; max-width: none; overflow-x: auto; overflow-y: initial; line-height: inherit;"><span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">/*
* 随机位置点击函数
* <span class="hljs-doctag" style="box-sizing: border-box; color: rgb(198, 120, 221);">@param</span> {number} x - 点击位置的百分比 X 坐标
* <span class="hljs-doctag" style="box-sizing: border-box; color: rgb(198, 120, 221);">@param</span> {number} y - 点击位置的百分比 Y 坐标
* <span class="hljs-doctag" style="box-sizing: border-box; color: rgb(198, 120, 221);">@param</span> {number} x范围 - X 坐标的随机范围
* <span class="hljs-doctag" style="box-sizing: border-box; color: rgb(198, 120, 221);">@param</span> {number} y范围 - Y 坐标的随机范围
*/</span>
<span class="hljs-function" style="box-sizing: border-box;"><span class="hljs-keyword" style="box-sizing: border-box; color: rgb(198, 120, 221);">function</span> 随机位置点击(<span class="hljs-params" style="box-sizing: border-box;">x, y, x范围, y范围</span>) </span>{
    <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 将百分比坐标转成真实坐标</span>
    <span class="hljs-keyword" style="box-sizing: border-box; color: rgb(198, 120, 221);">var</span> x1 = screen.percentToWidth(x);
    <span class="hljs-keyword" style="box-sizing: border-box; color: rgb(198, 120, 221);">var</span> y1 = screen.percentToHeight(y);

    <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 在指定范围内生成新的随机坐标</span>
    x1 = rand.randNumber(x1 - x范围, x1 + x范围);
    y1 = rand.randNumber(y1 - y范围, y1 + y范围);

    <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 执行点击操作</span>
    auto.clickPoint(x1, y1);
    printl(<span class="hljs-string" style="box-sizing: border-box; color: rgb(152, 195, 121);">'点击位置: '</span> + x1 + <span class="hljs-string" style="box-sizing: border-box; color: rgb(152, 195, 121);">', '</span> + y1);<span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 输出点击位置</span>
}

<span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">/*
* 拖拽随机百分比滑动函数
* <span class="hljs-doctag" style="box-sizing: border-box; color: rgb(198, 120, 221);">@param</span> {number} x1 - 拖动开始的百分比 X 坐标
* <span class="hljs-doctag" style="box-sizing: border-box; color: rgb(198, 120, 221);">@param</span> {number} y1 - 拖动开始的百分比 Y 坐标
* <span class="hljs-doctag" style="box-sizing: border-box; color: rgb(198, 120, 221);">@param</span> {number} x2 - 拖动结束的百分比 X 坐标
* <span class="hljs-doctag" style="box-sizing: border-box; color: rgb(198, 120, 221);">@param</span> {number} y2 - 拖动结束的百分比 Y 坐标
* <span class="hljs-doctag" style="box-sizing: border-box; color: rgb(198, 120, 221);">@param</span> {number} time - 滑动的持续时间(毫秒)
*/</span>
<span class="hljs-function" style="box-sizing: border-box;"><span class="hljs-keyword" style="box-sizing: border-box; color: rgb(198, 120, 221);">function</span> 拖拽<span class="hljs-title" style="box-sizing: border-box; color: rgb(97, 174, 238);">_</span>随机百分比滑动(<span class="hljs-params" style="box-sizing: border-box;">x1, y1, x2, y2, time</span>) </span>{
    <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 将百分比坐标转成真实坐标</span>
    x1 = screen.percentToWidth(x1);
    y1 = screen.percentToHeight(y1);
    x2 = screen.percentToWidth(x2);
    y2 = screen.percentToHeight(y2);

    <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 添加随机数以模拟不规则滑动</span>
    x1 = rand.randNumber(x1 - <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">10</span>, x1 + <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">10</span>);
    y1 = rand.randNumber(y1 - <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">10</span>, y1 + <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">10</span>);
    x2 = rand.randNumber(x2 - <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">10</span>, x2 + <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">10</span>);
    y2 = rand.randNumber(y2 - <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">10</span>, y2 + <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">10</span>);

    <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 执行滑动操作</span>
    auto.swip(x1, y1, x2, y2, time, <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">0</span>);
    printl(<span class="hljs-string" style="box-sizing: border-box; color: rgb(152, 195, 121);">'滑动==&gt; 从 ('</span> + x1 + <span class="hljs-string" style="box-sizing: border-box; color: rgb(152, 195, 121);">', '</span> + y1 + <span class="hljs-string" style="box-sizing: border-box; color: rgb(152, 195, 121);">') 到 ('</span> + x2 + <span class="hljs-string" style="box-sizing: border-box; color: rgb(152, 195, 121);">', '</span> + y2 + <span class="hljs-string" style="box-sizing: border-box; color: rgb(152, 195, 121);">')'</span>);<span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 输出滑动的起止位置</span>
}

<span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">/*
* 键鼠随机百分比滑动函数
* <span class="hljs-doctag" style="box-sizing: border-box; color: rgb(198, 120, 221);">@param</span> {number} x1 - 拖动开始的百分比 X 坐标
* <span class="hljs-doctag" style="box-sizing: border-box; color: rgb(198, 120, 221);">@param</span> {number} y1 - 拖动开始的百分比 Y 坐标
* <span class="hljs-doctag" style="box-sizing: border-box; color: rgb(198, 120, 221);">@param</span> {number} x2 - 拖动结束的百分比 X 坐标
* <span class="hljs-doctag" style="box-sizing: border-box; color: rgb(198, 120, 221);">@param</span> {number} y2 - 拖动结束的百分比 Y 坐标
*/</span>
<span class="hljs-function" style="box-sizing: border-box;"><span class="hljs-keyword" style="box-sizing: border-box; color: rgb(198, 120, 221);">function</span> 键鼠<span class="hljs-title" style="box-sizing: border-box; color: rgb(97, 174, 238);">_</span>随机百分比滑动(<span class="hljs-params" style="box-sizing: border-box;">x1, y1, x2, y2</span>) </span>{
    <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 将百分比坐标转成真实坐标</span>
    x1 = screen.percentToWidth(x1);
    y1 = screen.percentToHeight(y1);
    x2 = screen.percentToWidth(x2);
    y2 = screen.percentToHeight(y2);

    <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 默认路径值(如果有需要,请通过其他功能定义路径)</span>
    <span class="hljs-keyword" style="box-sizing: border-box; color: rgb(198, 120, 221);">var</span> 路径 = <span class="hljs-literal" style="box-sizing: border-box; color: rgb(86, 182, 194);">null</span>; <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 可以根据需要给它一个合适的默认值</span>

    <span class="hljs-keyword" style="box-sizing: border-box; color: rgb(198, 120, 221);">try</span> {
      <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 检查路径并输出</span>
      <span class="hljs-keyword" style="box-sizing: border-box; color: rgb(198, 120, 221);">if</span> (路径 != <span class="hljs-literal" style="box-sizing: border-box; color: rgb(86, 182, 194);">null</span>) {
            printl(路径);
      }
    } <span class="hljs-keyword" style="box-sizing: border-box; color: rgb(198, 120, 221);">catch</span> (<span class="hljs-built_in" style="box-sizing: border-box; color: rgb(230, 192, 123);">error</span>) {
      printl(<span class="hljs-string" style="box-sizing: border-box; color: rgb(152, 195, 121);">'路径检查错误: '</span> + <span class="hljs-built_in" style="box-sizing: border-box; color: rgb(230, 192, 123);">error</span>);<span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 捕捉路径检查错误</span>
    }

    <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 执行滑动操作</span>
    auto.swip(x1, y1, x2, y2, <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">500</span>, <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">0</span>);
    printl(<span class="hljs-string" style="box-sizing: border-box; color: rgb(152, 195, 121);">'滑动==&gt; 从 ('</span> + x1 + <span class="hljs-string" style="box-sizing: border-box; color: rgb(152, 195, 121);">', '</span> + y1 + <span class="hljs-string" style="box-sizing: border-box; color: rgb(152, 195, 121);">') 到 ('</span> + x2 + <span class="hljs-string" style="box-sizing: border-box; color: rgb(152, 195, 121);">', '</span> + y2 + <span class="hljs-string" style="box-sizing: border-box; color: rgb(152, 195, 121);">')'</span>);<span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 输出滑动的起止位置</span>
}

<span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">/*
* 示例调用函数
* 该函数展示了如何调用上面定义的函数
*/</span>
<span class="hljs-function" style="box-sizing: border-box;"><span class="hljs-keyword" style="box-sizing: border-box; color: rgb(198, 120, 221);">function</span> 示例调用(<span class="hljs-params" style="box-sizing: border-box;"></span>) </span>{
    <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 示例点击具体坐标</span>
    auto.clickPoint(<span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">107</span>, <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">595</span>); <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 直接点击屏幕坐标(107, 595)</span>
    printl(<span class="hljs-string" style="box-sizing: border-box; color: rgb(152, 195, 121);">'直接点击位置: (107, 595)'</span>);

    <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 示例点击百分比位置</span>
    auto.clickPercent(<span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">0.3628</span>, <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">0.3271</span>); <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 点击百分比坐标</span>
    printl(<span class="hljs-string" style="box-sizing: border-box; color: rgb(152, 195, 121);">'点击位置: 百分比(0.3628, 0.3271)'</span>);

    <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 示例随机点击,在屏幕中点范围内随机位置</span>
    随机位置点击(<span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">50</span>, <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">50</span>, <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">10</span>, <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">10</span>);

    <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 示例拖拽,从左上角到右下角滑动,持续时间为1秒</span>
    拖拽_随机百分比滑动(<span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">20</span>, <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">20</span>, <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">80</span>, <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">80</span>, <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">1000</span>);

    <span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 示例键鼠滑动,从左上角到右下角滑动</span>
    键鼠_随机百分比滑动(<span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">30</span>, <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">30</span>, <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">70</span>, <span class="hljs-number" style="box-sizing: border-box; color: rgb(209, 154, 102);">70</span>);
}

<span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">// 调用示例函数</span>
示例调用();

<span class="hljs-comment" style="box-sizing: border-box; color: rgb(170, 170, 170); font-style: italic;">/*
* 特别说明:
* 1. 在运行此代码之前,确保相关函数和库已加载。
* 2. 在实际设备或模拟器中测试前,请确保屏幕分辨率和坐标系统正确获取。
* 3. 随机范围和滑动时间可根据实际需求进行调整。
*/</span>
</code></pre><h3 id="h3-1-code-code-" style="margin-top: 1em; margin-bottom: 1.5em; box-sizing: border-box; position: relative; line-height: 1.75; color: rgb(51, 51, 51); font-family: &quot;Microsoft YaHei&quot;, Helvetica, &quot;Meiryo UI&quot;, &quot;Malgun Gothic&quot;, &quot;Segoe UI&quot;, &quot;Trebuchet MS&quot;, Monaco, monospace, Tahoma, STXihei, 华文细黑, STHeiti, &quot;Helvetica Neue&quot;, &quot;Droid Sans&quot;, &quot;wenquanyi micro hei&quot;, FreeSans, Arimo, Arial, SimSun, 宋体, Heiti, 黑体, sans-serif; font-size: 1.25em !important;"><a name="1. <code>随机位置点击</code> 函数" class="reference-link" style="color: rgb(65, 131, 196); text-decoration-line: underline; transition: color 0.08s ease-out 0s; box-sizing: border-box; background: 0px 0px;"></a>1.&nbsp;<code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; font-size: 14px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">随机位置点击</code>&nbsp;函数</h3><ul style="margin-bottom: 1.5em; margin-left: 14px; padding-left: 2em; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &quot;Microsoft YaHei&quot;, Helvetica, &quot;Meiryo UI&quot;, &quot;Malgun Gothic&quot;, &quot;Segoe UI&quot;, &quot;Trebuchet MS&quot;, Monaco, monospace, Tahoma, STXihei, 华文细黑, STHeiti, &quot;Helvetica Neue&quot;, &quot;Droid Sans&quot;, &quot;wenquanyi micro hei&quot;, FreeSans, Arimo, Arial, SimSun, 宋体, Heiti, 黑体, sans-serif;"><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><span style="box-sizing: border-box; font-weight: 700;">功能</span>:在指定的百分比坐标附近随机点击。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><span style="box-sizing: border-box; font-weight: 700;">参数</span>:<ul style="margin-left: 14px; padding-left: 2em; box-sizing: border-box;"><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">x</code>:点击位置的百分比 X 坐标。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">y</code>:点击位置的百分比 Y 坐标。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">x范围</code>:X 坐标的随机范围。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">y范围</code>:Y 坐标的随机范围。</li></ul></li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><span style="box-sizing: border-box; font-weight: 700;">实现</span>:<ul style="margin-left: 14px; padding-left: 2em; box-sizing: border-box;"><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;">首先将百分比坐标转换为实际屏幕坐标。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;">然后在指定范围内生成新的随机坐标。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;">最后执行点击操作,并输出点击位置。</li></ul></li></ul><h3 id="h3-2-code-_-code-" style="margin-top: 1em; margin-bottom: 1.5em; box-sizing: border-box; position: relative; line-height: 1.75; color: rgb(51, 51, 51); font-family: &quot;Microsoft YaHei&quot;, Helvetica, &quot;Meiryo UI&quot;, &quot;Malgun Gothic&quot;, &quot;Segoe UI&quot;, &quot;Trebuchet MS&quot;, Monaco, monospace, Tahoma, STXihei, 华文细黑, STHeiti, &quot;Helvetica Neue&quot;, &quot;Droid Sans&quot;, &quot;wenquanyi micro hei&quot;, FreeSans, Arimo, Arial, SimSun, 宋体, Heiti, 黑体, sans-serif; font-size: 1.25em !important;"><a name="2. <code>拖拽_随机百分比滑动</code> 函数" class="reference-link" style="color: rgb(65, 131, 196); text-decoration-line: underline; transition: color 0.08s ease-out 0s; box-sizing: border-box; background: 0px 0px;"></a>2.&nbsp;<code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; font-size: 14px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">拖拽_随机百分比滑动</code>&nbsp;函数</h3><ul style="margin-bottom: 1.5em; margin-left: 14px; padding-left: 2em; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &quot;Microsoft YaHei&quot;, Helvetica, &quot;Meiryo UI&quot;, &quot;Malgun Gothic&quot;, &quot;Segoe UI&quot;, &quot;Trebuchet MS&quot;, Monaco, monospace, Tahoma, STXihei, 华文细黑, STHeiti, &quot;Helvetica Neue&quot;, &quot;Droid Sans&quot;, &quot;wenquanyi micro hei&quot;, FreeSans, Arimo, Arial, SimSun, 宋体, Heiti, 黑体, sans-serif;"><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><span style="box-sizing: border-box; font-weight: 700;">功能</span>:在指定的百分比坐标范围内进行拖拽滑动,并添加随机数以模拟不规则滑动。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><span style="box-sizing: border-box; font-weight: 700;">参数</span>:<ul style="margin-left: 14px; padding-left: 2em; box-sizing: border-box;"><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">x1</code>:拖动开始的百分比 X 坐标。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">y1</code>:拖动开始的百分比 Y 坐标。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">x2</code>:拖动结束的百分比 X 坐标。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">y2</code>:拖动结束的百分比 Y 坐标。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">time</code>:滑动的持续时间(毫秒)。</li></ul></li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><span style="box-sizing: border-box; font-weight: 700;">实现</span>:<ul style="margin-left: 14px; padding-left: 2em; box-sizing: border-box;"><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;">将百分比坐标转换为实际屏幕坐标。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;">添加随机数以模拟不规则滑动。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;">执行滑动操作,并输出滑动的起止位置。</li></ul></li></ul><h3 id="h3-3-code-_-code-" style="margin-top: 1em; margin-bottom: 1.5em; box-sizing: border-box; position: relative; line-height: 1.75; color: rgb(51, 51, 51); font-family: &quot;Microsoft YaHei&quot;, Helvetica, &quot;Meiryo UI&quot;, &quot;Malgun Gothic&quot;, &quot;Segoe UI&quot;, &quot;Trebuchet MS&quot;, Monaco, monospace, Tahoma, STXihei, 华文细黑, STHeiti, &quot;Helvetica Neue&quot;, &quot;Droid Sans&quot;, &quot;wenquanyi micro hei&quot;, FreeSans, Arimo, Arial, SimSun, 宋体, Heiti, 黑体, sans-serif; font-size: 1.25em !important;"><a name="3. <code>键鼠_随机百分比滑动</code> 函数" class="reference-link" style="color: rgb(65, 131, 196); text-decoration-line: underline; transition: color 0.08s ease-out 0s; box-sizing: border-box; background: 0px 0px;"></a>3.&nbsp;<code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; font-size: 14px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">键鼠_随机百分比滑动</code>&nbsp;函数<a href="http://www.postbbs.com/plugin.php?id=iplus_seolinks:links&amp;url=aHR0cDovL2Jicy5haXdvcmsyNC5jb20vdGhyZWFkLTEzMS0xLTEuaHRtbA==" target="_blank" style="color: rgb(133, 42, 42); transition: all 0.2s ease 0s;">http://bbs.aiwork24.com/thread-131-1-1.html</a></h3><ul style="margin-bottom: 1.5em; margin-left: 14px; padding-left: 2em; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &quot;Microsoft YaHei&quot;, Helvetica, &quot;Meiryo UI&quot;, &quot;Malgun Gothic&quot;, &quot;Segoe UI&quot;, &quot;Trebuchet MS&quot;, Monaco, monospace, Tahoma, STXihei, 华文细黑, STHeiti, &quot;Helvetica Neue&quot;, &quot;Droid Sans&quot;, &quot;wenquanyi micro hei&quot;, FreeSans, Arimo, Arial, SimSun, 宋体, Heiti, 黑体, sans-serif;"><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><span style="box-sizing: border-box; font-weight: 700;">功能</span>:在指定的百分比坐标范围内进行滑动,路径默认为&nbsp;<code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">null</code>。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><span style="box-sizing: border-box; font-weight: 700;">参数</span>:<ul style="margin-left: 14px; padding-left: 2em; box-sizing: border-box;"><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">x1</code>:拖动开始的百分比 X 坐标。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">y1</code>:拖动开始的百分比 Y 坐标。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">x2</code>:拖动结束的百分比 X 坐标。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">y2</code>:拖动结束的百分比 Y 坐标。</li></ul></li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><span style="box-sizing: border-box; font-weight: 700;">实现</span>:<ul style="margin-left: 14px; padding-left: 2em; box-sizing: border-box;"><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;">将百分比坐标转换为实际屏幕坐标。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;">检查路径并输出(如果有)。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;">执行滑动操作,并输出滑动的起止位置。</li></ul></li></ul><h3 id="h3-4-code-code-" style="margin-top: 1em; margin-bottom: 1.5em; box-sizing: border-box; position: relative; line-height: 1.75; color: rgb(51, 51, 51); font-family: &quot;Microsoft YaHei&quot;, Helvetica, &quot;Meiryo UI&quot;, &quot;Malgun Gothic&quot;, &quot;Segoe UI&quot;, &quot;Trebuchet MS&quot;, Monaco, monospace, Tahoma, STXihei, 华文细黑, STHeiti, &quot;Helvetica Neue&quot;, &quot;Droid Sans&quot;, &quot;wenquanyi micro hei&quot;, FreeSans, Arimo, Arial, SimSun, 宋体, Heiti, 黑体, sans-serif; font-size: 1.25em !important;"><a name="4. <code>示例调用</code> 函数" class="reference-link" style="color: rgb(65, 131, 196); text-decoration-line: underline; transition: color 0.08s ease-out 0s; box-sizing: border-box; background: 0px 0px;"></a>4.&nbsp;<code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; font-size: 14px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">示例调用</code>&nbsp;函数</h3><ul style="margin-bottom: 1.5em; margin-left: 14px; padding-left: 2em; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &quot;Microsoft YaHei&quot;, Helvetica, &quot;Meiryo UI&quot;, &quot;Malgun Gothic&quot;, &quot;Segoe UI&quot;, &quot;Trebuchet MS&quot;, Monaco, monospace, Tahoma, STXihei, 华文细黑, STHeiti, &quot;Helvetica Neue&quot;, &quot;Droid Sans&quot;, &quot;wenquanyi micro hei&quot;, FreeSans, Arimo, Arial, SimSun, 宋体, Heiti, 黑体, sans-serif;"><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><span style="box-sizing: border-box; font-weight: 700;">功能</span>:展示如何调用上述定义的函数。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><span style="box-sizing: border-box; font-weight: 700;">实现</span>:<ul style="margin-left: 14px; padding-left: 2em; box-sizing: border-box;"><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;">直接点击屏幕坐标&nbsp;<code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">(107, 595)</code>。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;">点击百分比坐标&nbsp;<code style="box-sizing: border-box; font-family: Consolas, Monaco, &quot;Lucida Console&quot;, &quot;Liberation Mono&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, monospace; padding: 3px; background: rgb(249, 249, 249); border-radius: 3px; border: 1px solid rgb(221, 221, 221); color: rgb(64, 158, 255);">(0.3628, 0.3271)</code>。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;">在屏幕中点范围内随机位置点击。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;">从左上角到右下角进行拖拽滑动,持续时间为 1 秒。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;">从左上角到右下角进行键鼠滑动。</li></ul></li></ul><h3 id="h3-5-" style="margin-top: 1em; margin-bottom: 1.5em; box-sizing: border-box; position: relative; line-height: 1.75; color: rgb(51, 51, 51); font-family: &quot;Microsoft YaHei&quot;, Helvetica, &quot;Meiryo UI&quot;, &quot;Malgun Gothic&quot;, &quot;Segoe UI&quot;, &quot;Trebuchet MS&quot;, Monaco, monospace, Tahoma, STXihei, 华文细黑, STHeiti, &quot;Helvetica Neue&quot;, &quot;Droid Sans&quot;, &quot;wenquanyi micro hei&quot;, FreeSans, Arimo, Arial, SimSun, 宋体, Heiti, 黑体, sans-serif; font-size: 1.25em !important;"><a name="5. 特别说明" class="reference-link" style="color: rgb(65, 131, 196); text-decoration-line: underline; transition: color 0.08s ease-out 0s; box-sizing: border-box; background: 0px 0px;"></a>5. 特别说明</h3><ul style="margin-left: 14px; padding-left: 2em; box-sizing: border-box; color: rgb(51, 51, 51); font-family: &quot;Microsoft YaHei&quot;, Helvetica, &quot;Meiryo UI&quot;, &quot;Malgun Gothic&quot;, &quot;Segoe UI&quot;, &quot;Trebuchet MS&quot;, Monaco, monospace, Tahoma, STXihei, 华文细黑, STHeiti, &quot;Helvetica Neue&quot;, &quot;Droid Sans&quot;, &quot;wenquanyi micro hei&quot;, FreeSans, Arimo, Arial, SimSun, 宋体, Heiti, 黑体, sans-serif;"><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><span style="box-sizing: border-box; font-weight: 700;">运行前准备</span>:确保相关函数和库已加载。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><span style="box-sizing: border-box; font-weight: 700;">测试前准备</span>:确保屏幕分辨率和坐标系统正确获取。</li><li style="list-style-position: initial; list-style-image: initial; box-sizing: border-box;"><span style="box-sizing: border-box; font-weight: 700;">参数调整</span>:随机范围和滑动时间可根据实际需求进行调整。</li></ul></div></td></tr></tbody></table></div></td></tr></tbody></table></div>
页: [1]
查看完整版本: AIWROK软件随机位置范围点击和范围随机拖动