ms-vite-plugin 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build.js +6 -0
- package/dist/cli.js +91 -1
- package/dist/mcp/device-config.d.ts +55 -0
- package/dist/mcp/device-config.js +183 -0
- package/dist/mcp/docs-service.d.ts +65 -0
- package/dist/mcp/docs-service.js +168 -0
- package/dist/mcp/project.d.ts +16 -0
- package/dist/mcp/project.js +74 -0
- package/dist/mcp/tools.d.ts +18 -0
- package/dist/mcp/tools.js +825 -0
- package/dist/mcp/types.d.ts +32 -0
- package/dist/mcp/types.js +11 -0
- package/dist/mcp-server.d.ts +2 -0
- package/dist/mcp-server.js +86 -0
- package/dist/project.d.ts +89 -0
- package/dist/project.js +306 -0
- package/dist/version.d.ts +12 -0
- package/dist/version.js +63 -0
- package/docs/api/action.md +922 -0
- package/docs/api/appleocr.md +229 -0
- package/docs/api/config.md +122 -0
- package/docs/api/cryptoUtils.md +232 -0
- package/docs/api/device.md +374 -0
- package/docs/api/file.md +516 -0
- package/docs/api/global.md +617 -0
- package/docs/api/hid.md +1032 -0
- package/docs/api/hotUpdate.md +166 -0
- package/docs/api/http.md +548 -0
- package/docs/api/image.md +907 -0
- package/docs/api/ime.md +290 -0
- package/docs/api/logger.md +324 -0
- package/docs/api/media.md +248 -0
- package/docs/api/mysql.md +441 -0
- package/docs/api/netCard.md +200 -0
- package/docs/api/node.md +353 -0
- package/docs/api/paddleocr.md +246 -0
- package/docs/api/pip.md +242 -0
- package/docs/api/system.md +572 -0
- package/docs/api/thread.md +269 -0
- package/docs/api/tomatoocr.md +425 -0
- package/docs/api/tts.md +334 -0
- package/docs/api/ui.md +947 -0
- package/docs/api/utils.md +265 -0
- package/docs/api/yolo.md +310 -0
- package/docs/apicn/action.md +919 -0
- package/docs/apicn/appleocr.md +233 -0
- package/docs/apicn/config.md +120 -0
- package/docs/apicn/device.md +385 -0
- package/docs/apicn/file.md +511 -0
- package/docs/apicn/global.md +613 -0
- package/docs/apicn/hid.md +1033 -0
- package/docs/apicn/hotUpdate.md +170 -0
- package/docs/apicn/http.md +672 -0
- package/docs/apicn/image.md +924 -0
- package/docs/apicn/ime.md +290 -0
- package/docs/apicn/logger.md +332 -0
- package/docs/apicn/media.md +252 -0
- package/docs/apicn/mysql.md +445 -0
- package/docs/apicn/netCard.md +200 -0
- package/docs/apicn/node.md +362 -0
- package/docs/apicn/paddleocr.md +255 -0
- package/docs/apicn/pip.md +242 -0
- package/docs/apicn/system.md +575 -0
- package/docs/apicn/thread.md +269 -0
- package/docs/apicn/tts.md +338 -0
- package/docs/apicn/ui.md +933 -0
- package/docs/apicn/utils.md +265 -0
- package/docs/apicn/yolo.md +314 -0
- package/docs/apipython/action.md +901 -0
- package/docs/apipython/appleocr.md +226 -0
- package/docs/apipython/config.md +126 -0
- package/docs/apipython/cryptoUtils.md +246 -0
- package/docs/apipython/device.md +365 -0
- package/docs/apipython/file.md +476 -0
- package/docs/apipython/g.md +154 -0
- package/docs/apipython/hid.md +1059 -0
- package/docs/apipython/hotUpdate.md +154 -0
- package/docs/apipython/image.md +938 -0
- package/docs/apipython/ime.md +306 -0
- package/docs/apipython/logger.md +330 -0
- package/docs/apipython/media.md +221 -0
- package/docs/apipython/mysql.md +432 -0
- package/docs/apipython/netCard.md +219 -0
- package/docs/apipython/node.md +331 -0
- package/docs/apipython/overview.md +66 -0
- package/docs/apipython/paddleocr.md +211 -0
- package/docs/apipython/pip.md +231 -0
- package/docs/apipython/system.md +458 -0
- package/docs/apipython/tomatoocr.md +444 -0
- package/docs/apipython/tts.md +331 -0
- package/docs/apipython/ui.md +949 -0
- package/docs/apipython/utils.md +284 -0
- package/docs/apipython/yolo.md +281 -0
- package/package.json +8 -4
|
@@ -0,0 +1,901 @@
|
|
|
1
|
+
# 动作模块 (Action)
|
|
2
|
+
|
|
3
|
+
动作模块提供了丰富的触摸和按键操作功能,包括点击、滑动、长按滑动、返回首页、多点触摸等动作。
|
|
4
|
+
|
|
5
|
+
**注意事项**
|
|
6
|
+
|
|
7
|
+
- 此模块仅支持 快点 Agent 模式使用
|
|
8
|
+
- HID 模式,请使用 HID 模块
|
|
9
|
+
|
|
10
|
+
## 类型定义
|
|
11
|
+
|
|
12
|
+
```python
|
|
13
|
+
from typing import TypedDict, List, Literal, Optional
|
|
14
|
+
|
|
15
|
+
class TapPoint(TypedDict):
|
|
16
|
+
x: int
|
|
17
|
+
y: int
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 抖动值
|
|
21
|
+
|
|
22
|
+
### setJitterValue - 设置动作抖动值
|
|
23
|
+
|
|
24
|
+
默认抖动值为 5 像素,设置后有 jitter 参数的动作会在像素范围 `-value` 到 `value` 随机偏移。
|
|
25
|
+
|
|
26
|
+
```python
|
|
27
|
+
def setJitterValue(value: int) -> None
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**参数说明:**
|
|
31
|
+
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
32
|
+
| ---------- | ------- | -------- | ------ | ------------------------------------------------------- |
|
|
33
|
+
| `value` | int | 是 | - | 抖动值,点击、滑动等动作会在像素范围 `-value` 到 `value` 随机偏移 |
|
|
34
|
+
|
|
35
|
+
**返回值:** 无
|
|
36
|
+
|
|
37
|
+
**示例:**
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from kuaijs import action
|
|
41
|
+
# 设置抖动值为5像素
|
|
42
|
+
action.setJitterValue(5)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## 基础触摸操作
|
|
46
|
+
|
|
47
|
+
### click - 点击操作
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
def click(x: int, y: int, duration: int = 20, jitter: bool = False) -> bool
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**参数说明:**
|
|
54
|
+
|
|
55
|
+
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
56
|
+
| ---------- | ---- | -------- | ------ | ---------------------- |
|
|
57
|
+
| `x` | int | 是 | - | 点击的 x 坐标 |
|
|
58
|
+
| `y` | int | 是 | - | 点击的 y 坐标 |
|
|
59
|
+
| `duration` | int | 否 | 20 | 点击持续时间,单位毫秒 |
|
|
60
|
+
| `jitter` | bool | 否 | False | 启用随机抖动偏移 |
|
|
61
|
+
|
|
62
|
+
**返回值:**
|
|
63
|
+
|
|
64
|
+
| 类型 | 描述 |
|
|
65
|
+
| ------ | ------------ |
|
|
66
|
+
| `bool` | 点击是否成功 |
|
|
67
|
+
|
|
68
|
+
**示例:**
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
from kuaijs import action
|
|
72
|
+
|
|
73
|
+
# 基础点击
|
|
74
|
+
if action.click(100, 100, 20, False):
|
|
75
|
+
print("点击成功")
|
|
76
|
+
|
|
77
|
+
# 带抖动的点击(更自然,避免检测)
|
|
78
|
+
action.click(200, 300, 50, True)
|
|
79
|
+
|
|
80
|
+
# 快速点击
|
|
81
|
+
action.click(150, 250, 10, False)
|
|
82
|
+
|
|
83
|
+
# 长按效果(增加持续时间)
|
|
84
|
+
action.click(100, 100, 800, True)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### clickRandom - 执行随机点击操作
|
|
88
|
+
|
|
89
|
+
```python
|
|
90
|
+
def clickRandom(x1: int, y1: int, x2: int, y2: int, duration: int = 20) -> bool
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**参数说明:**
|
|
94
|
+
|
|
95
|
+
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
96
|
+
| ---------- | ---- | -------- | ------ | --------------------------- |
|
|
97
|
+
| `x1` | int | 是 | - | 随机点击区域的左上角 x 坐标 |
|
|
98
|
+
| `y1` | int | 是 | - | 随机点击区域的左上角 y 坐标 |
|
|
99
|
+
| `x2` | int | 是 | - | 随机点击区域的右下角 x 坐标 |
|
|
100
|
+
| `y2` | int | 是 | - | 随机点击区域的右下角 y 坐标 |
|
|
101
|
+
| `duration` | int | 否 | 20 | 点击持续时间,单位毫秒 |
|
|
102
|
+
|
|
103
|
+
**返回值:**
|
|
104
|
+
|
|
105
|
+
| 类型 | 描述 |
|
|
106
|
+
| ------ | ---------------- |
|
|
107
|
+
| `bool` | 随机点击是否成功 |
|
|
108
|
+
|
|
109
|
+
**示例:**
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
from kuaijs import action
|
|
113
|
+
|
|
114
|
+
# 在指定矩形区域内随机点击
|
|
115
|
+
action.clickRandom(100, 100, 200, 200, 20)
|
|
116
|
+
|
|
117
|
+
# 在更大区域内随机点击
|
|
118
|
+
action.clickRandom(50, 50, 400, 600, 50)
|
|
119
|
+
|
|
120
|
+
# 快速随机点击
|
|
121
|
+
action.clickRandom(150, 150, 250, 250, 10)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### doubleClick - 执行双击操作
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
def doubleClick(x: int, y: int, duration: int = 20, interval: int = 20, jitter: bool = False) -> bool
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**参数说明:**
|
|
131
|
+
|
|
132
|
+
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
133
|
+
| ---------- | ---- | -------- | ------ | -------------------------------- |
|
|
134
|
+
| `x` | int | 是 | - | 双击的 x 坐标 |
|
|
135
|
+
| `y` | int | 是 | - | 双击的 y 坐标 |
|
|
136
|
+
| `duration` | int | 否 | 20 | 每次点击的持续时间,单位毫秒 |
|
|
137
|
+
| `interval` | int | 否 | 20 | 两次点击之间的间隔时间,单位毫秒 |
|
|
138
|
+
| `jitter` | bool | 否 | False | 启用随机抖动偏移 |
|
|
139
|
+
|
|
140
|
+
**返回值:**
|
|
141
|
+
|
|
142
|
+
| 类型 | 描述 |
|
|
143
|
+
| ------ | ------------ |
|
|
144
|
+
| `bool` | 双击是否成功 |
|
|
145
|
+
|
|
146
|
+
**示例:**
|
|
147
|
+
|
|
148
|
+
```python
|
|
149
|
+
from kuaijs import action
|
|
150
|
+
|
|
151
|
+
# 基础双击
|
|
152
|
+
if action.doubleClick(100, 100, 20, 20, False):
|
|
153
|
+
print("双击成功")
|
|
154
|
+
|
|
155
|
+
# 带抖动的双击(更自然,避免检测)
|
|
156
|
+
action.doubleClick(200, 300, 50, 20, True)
|
|
157
|
+
|
|
158
|
+
# 慢速双击(增加间隔时间)
|
|
159
|
+
action.doubleClick(100, 100, 30, 300, True)
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### doubleClickRandom - 执行随机双击操作
|
|
163
|
+
|
|
164
|
+
```python
|
|
165
|
+
def doubleClickRandom(x1: int, y1: int, x2: int, y2: int, duration: int = 20, interval: int = 20) -> bool
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**参数说明:**
|
|
169
|
+
|
|
170
|
+
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
171
|
+
| ---------- | ---- | -------- | ------ | -------------------------------- |
|
|
172
|
+
| `x1` | int | 是 | - | 随机双击区域的左上角 x 坐标 |
|
|
173
|
+
| `y1` | int | 是 | - | 随机双击区域的左上角 y 坐标 |
|
|
174
|
+
| `x2` | int | 是 | - | 随机双击区域的右下角 x 坐标 |
|
|
175
|
+
| `y2` | int | 是 | - | 随机双击区域的右下角 y 坐标 |
|
|
176
|
+
| `duration` | int | 否 | 20 | 每次点击的持续时间,单位毫秒 |
|
|
177
|
+
| `interval` | int | 否 | 20 | 两次点击之间的间隔时间,单位毫秒 |
|
|
178
|
+
|
|
179
|
+
**返回值:**
|
|
180
|
+
|
|
181
|
+
| 类型 | 描述 |
|
|
182
|
+
| ------ | ---------------- |
|
|
183
|
+
| `bool` | 随机双击是否成功 |
|
|
184
|
+
|
|
185
|
+
**示例:**
|
|
186
|
+
|
|
187
|
+
```python
|
|
188
|
+
from kuaijs import action
|
|
189
|
+
|
|
190
|
+
# 在指定矩形区域内随机双击
|
|
191
|
+
action.doubleClickRandom(100, 100, 200, 200, 20, 20)
|
|
192
|
+
|
|
193
|
+
# 慢速随机双击
|
|
194
|
+
action.doubleClickRandom(100, 100, 300, 300, 30, 300)
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### swipe - 执行滑动操作
|
|
198
|
+
|
|
199
|
+
```python
|
|
200
|
+
def swipe(startX: int, startY: int, endX: int, endY: int, duration: int = 100, jitter: bool = False, steps: int = 6) -> bool
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
**参数说明:**
|
|
204
|
+
|
|
205
|
+
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
206
|
+
| ---------- | ---- | -------- | ------ | ------------------------------------------------------ |
|
|
207
|
+
| `startX` | int | 是 | - | 滑动起始坐标 x 坐标 |
|
|
208
|
+
| `startY` | int | 是 | - | 滑动起始坐标 y 坐标 |
|
|
209
|
+
| `endX` | int | 是 | - | 滑动结束坐标 x 坐标 |
|
|
210
|
+
| `endY` | int | 是 | - | 滑动结束坐标 y 坐标 |
|
|
211
|
+
| `duration` | int | 否 | 100 | 滑动持续时间,单位毫秒 |
|
|
212
|
+
| `jitter` | bool | 否 | False | 是否开启抖动,开启后会在滑动路径上随机偏移,默认 False |
|
|
213
|
+
| `steps` | int | 否 | 6 | 生成抖动点的数量,影响滑动的平滑度,默认 6 |
|
|
214
|
+
|
|
215
|
+
**返回值:**
|
|
216
|
+
|
|
217
|
+
| 类型 | 描述 |
|
|
218
|
+
| ------ | ------------ |
|
|
219
|
+
| `bool` | 滑动是否成功 |
|
|
220
|
+
|
|
221
|
+
**示例:**
|
|
222
|
+
|
|
223
|
+
```python
|
|
224
|
+
from kuaijs import action
|
|
225
|
+
|
|
226
|
+
# 基础滑动(从左到右)
|
|
227
|
+
action.swipe(100, 300, 400, 300, 500, False, 10)
|
|
228
|
+
|
|
229
|
+
# 向上滑动(滚动页面)
|
|
230
|
+
action.swipe(200, 600, 200, 200, 800, True, 15)
|
|
231
|
+
|
|
232
|
+
# 向下滑动
|
|
233
|
+
action.swipe(200, 200, 200, 600, 800, True, 15)
|
|
234
|
+
|
|
235
|
+
# 对角线滑动
|
|
236
|
+
action.swipe(100, 100, 300, 400, 1000, True, 20)
|
|
237
|
+
|
|
238
|
+
# 快速滑动
|
|
239
|
+
action.swipe(150, 500, 150, 100, 300, False, 5)
|
|
240
|
+
|
|
241
|
+
# 慢速精确滑动
|
|
242
|
+
action.swipe(100, 200, 300, 200, 1500, True, 30)
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### pressAndSwipe - 执行长按滑动操作,适用于拖拽等场景
|
|
246
|
+
|
|
247
|
+
```python
|
|
248
|
+
def pressAndSwipe(startX: int, startY: int, endX: int, endY: int, touch_down_duration: int = 500, touch_move_duration: int = 1000, touch_up_duration: int = 500, jitter: bool = False, steps: int = 6) -> bool
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**参数说明:**
|
|
252
|
+
|
|
253
|
+
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
254
|
+
| --------------------- | ---- | -------- | ------ | ------------------------------------------------------ |
|
|
255
|
+
| `startX` | int | 是 | - | 长按起始坐标 x 坐标 |
|
|
256
|
+
| `startY` | int | 是 | - | 长按起始坐标 y 坐标 |
|
|
257
|
+
| `endX` | int | 是 | - | 拖拽结束坐标 x 坐标 |
|
|
258
|
+
| `endY` | int | 是 | - | 拖拽结束坐标 y 坐标 |
|
|
259
|
+
| `touch_down_duration` | int | 否 | 500 | 按下阶段的持续时间,单位毫秒,默认 500ms |
|
|
260
|
+
| `touch_move_duration` | int | 否 | 1000 | 移动阶段的持续时间,单位毫秒,默认 1000ms |
|
|
261
|
+
| `touch_up_duration` | int | 否 | 500 | 松开阶段的持续时间,默认 500ms |
|
|
262
|
+
| `jitter` | bool | 否 | False | 是否开启抖动,开启后会在滑动路径上随机偏移,默认 False |
|
|
263
|
+
| `steps` | int | 否 | 6 | 移动过程中的步数,影响滑动的平滑度,默认 6 |
|
|
264
|
+
|
|
265
|
+
**返回值:**
|
|
266
|
+
|
|
267
|
+
| 类型 | 描述 |
|
|
268
|
+
| ------ | ---------------- |
|
|
269
|
+
| `bool` | 长按滑动是否成功 |
|
|
270
|
+
|
|
271
|
+
**示例:**
|
|
272
|
+
|
|
273
|
+
```python
|
|
274
|
+
from kuaijs import action
|
|
275
|
+
|
|
276
|
+
# 拖拽元素
|
|
277
|
+
action.pressAndSwipe(
|
|
278
|
+
100, 100, # 起始位置
|
|
279
|
+
300, 400, # 目标位置
|
|
280
|
+
500, # 按下500ms
|
|
281
|
+
1000, # 移动1000ms
|
|
282
|
+
200, # 松开200ms
|
|
283
|
+
True, # 开启抖动
|
|
284
|
+
20 # 20个步数
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
# 长按拖拽(更长的按下时间)
|
|
288
|
+
action.pressAndSwipe(150, 200, 350, 500, 1000, 800, 300, True, 15)
|
|
289
|
+
|
|
290
|
+
# 精确拖拽(无抖动)
|
|
291
|
+
action.pressAndSwipe(200, 300, 200, 100, 300, 600, 100, False, 25)
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### swipeCurve - 执行 3 点曲线滑动操作(先快后慢)
|
|
295
|
+
|
|
296
|
+
```python
|
|
297
|
+
def swipeCurve(startX: int, startY: int, midX: int, midY: int, endX: int, endY: int, duration: int = 1000) -> bool
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
**参数说明:**
|
|
301
|
+
|
|
302
|
+
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
303
|
+
| ---------- | ---- | -------- | ------ | ------------------------------------- |
|
|
304
|
+
| `startX` | int | 是 | - | 滑动起始坐标 x 坐标 |
|
|
305
|
+
| `startY` | int | 是 | - | 滑动起始坐标 y 坐标 |
|
|
306
|
+
| `midX` | int | 是 | - | 曲线中间控制点 x 坐标 |
|
|
307
|
+
| `midY` | int | 是 | - | 曲线中间控制点 y 坐标 |
|
|
308
|
+
| `endX` | int | 是 | - | 滑动结束坐标 x 坐标 |
|
|
309
|
+
| `endY` | int | 是 | - | 滑动结束坐标 y 坐标 |
|
|
310
|
+
| `duration` | int | 否 | 1000 | 总滑动持续时间,单位毫秒,默认 1000ms |
|
|
311
|
+
|
|
312
|
+
**返回值:**
|
|
313
|
+
|
|
314
|
+
| 类型 | 描述 |
|
|
315
|
+
| ------ | ---------------- |
|
|
316
|
+
| `bool` | 曲线滑动是否成功 |
|
|
317
|
+
|
|
318
|
+
**功能特点:**
|
|
319
|
+
|
|
320
|
+
- 使用二次贝塞尔曲线算法生成平滑的滑动路径
|
|
321
|
+
- 实现先快后慢的滑动效果,模拟真实的手势操作
|
|
322
|
+
- 根据滑动距离自动调整路径点数量,确保滑动平滑度
|
|
323
|
+
- **拟人化轨迹**:添加随机偏移和微抖动,模拟真实人手操作的不稳定性
|
|
324
|
+
- **随机化时间**:每个路径点的时间间隔都有随机变化,避免机械化操作
|
|
325
|
+
- **智能偏移**:中间路径点偏移更大,起点和终点保持精确,更符合人类操作习惯
|
|
326
|
+
- 适用于需要更自然滑动轨迹场景
|
|
327
|
+
|
|
328
|
+
**示例:**
|
|
329
|
+
|
|
330
|
+
```python
|
|
331
|
+
from kuaijs import action
|
|
332
|
+
|
|
333
|
+
# 基础曲线滑动
|
|
334
|
+
action.swipeCurve(100, 100, 200, 150, 300, 200, 1000)
|
|
335
|
+
|
|
336
|
+
# 弧形向上滑动
|
|
337
|
+
action.swipeCurve(200, 500, 150, 300, 200, 100, 800)
|
|
338
|
+
|
|
339
|
+
# S形曲线滑动
|
|
340
|
+
action.swipeCurve(100, 200, 300, 100, 200, 400, 1200)
|
|
341
|
+
|
|
342
|
+
# 快速曲线滑动
|
|
343
|
+
action.swipeCurve(150, 300, 250, 200, 350, 400, 600)
|
|
344
|
+
|
|
345
|
+
# 慢速精确曲线滑动
|
|
346
|
+
action.swipeCurve(100, 100, 200, 50, 300, 100, 1500)
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
## 文本输入操作
|
|
350
|
+
|
|
351
|
+
- 仅输入框聚焦可用,以下方法是在模拟键盘操作
|
|
352
|
+
- 更多高级输入操作,请参考 [IME 模块](ime.md)
|
|
353
|
+
|
|
354
|
+
### input - 输入文本
|
|
355
|
+
|
|
356
|
+
```python
|
|
357
|
+
def input(text: str) -> bool
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
**参数说明:**
|
|
361
|
+
|
|
362
|
+
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
363
|
+
| ------ | ---- | -------- | ------ | ---------------- |
|
|
364
|
+
| `text` | str | 是 | - | 要输入的文本内容 |
|
|
365
|
+
|
|
366
|
+
**返回值:**
|
|
367
|
+
|
|
368
|
+
| 类型 | 描述 |
|
|
369
|
+
| ------ | ---------------- |
|
|
370
|
+
| `bool` | 输入文本是否成功 |
|
|
371
|
+
|
|
372
|
+
**示例:**
|
|
373
|
+
|
|
374
|
+
```python
|
|
375
|
+
from kuaijs import action
|
|
376
|
+
if action.input("hello 快点JS"):
|
|
377
|
+
print("成功输入文本")
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### backspace - 删除文本
|
|
381
|
+
|
|
382
|
+
```python
|
|
383
|
+
def backspace(count: int = 1) -> bool
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
**参数说明:**
|
|
387
|
+
|
|
388
|
+
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
389
|
+
| ------- | ---- | -------- | ------ | --------------------------- |
|
|
390
|
+
| `count` | int | 否 | 1 | 删除数量,默认删除 1 个字符 |
|
|
391
|
+
|
|
392
|
+
**返回值:**
|
|
393
|
+
|
|
394
|
+
| 类型 | 描述 |
|
|
395
|
+
| ------ | ---------------- |
|
|
396
|
+
| `bool` | 删除文本是否成功 |
|
|
397
|
+
|
|
398
|
+
**示例:**
|
|
399
|
+
|
|
400
|
+
```python
|
|
401
|
+
from kuaijs import action
|
|
402
|
+
|
|
403
|
+
# 删除最后一个字符
|
|
404
|
+
if action.backspace():
|
|
405
|
+
print("成功删除最后一个字符")
|
|
406
|
+
|
|
407
|
+
# 删除多个字符
|
|
408
|
+
if action.backspace(3):
|
|
409
|
+
print("成功删除 3 个字符")
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
### enter - 调用回车
|
|
413
|
+
|
|
414
|
+
```python
|
|
415
|
+
def enter() -> bool
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
**返回值:**
|
|
419
|
+
|
|
420
|
+
| 类型 | 描述 |
|
|
421
|
+
| ------ | ---------------- |
|
|
422
|
+
| `bool` | 调用回车是否成功 |
|
|
423
|
+
|
|
424
|
+
**示例:**
|
|
425
|
+
|
|
426
|
+
```python
|
|
427
|
+
from kuaijs import action
|
|
428
|
+
|
|
429
|
+
# 调用回车
|
|
430
|
+
if action.enter():
|
|
431
|
+
print("成功调用回车")
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
## 系统按键操作
|
|
435
|
+
|
|
436
|
+
### homeScreen - 返回到设备主屏幕
|
|
437
|
+
|
|
438
|
+
```python
|
|
439
|
+
def homeScreen() -> bool
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
**返回值:**
|
|
443
|
+
|
|
444
|
+
| 类型 | 描述 |
|
|
445
|
+
| ------ | ---------------- |
|
|
446
|
+
| `bool` | 返回首页是否成功 |
|
|
447
|
+
|
|
448
|
+
**示例:**
|
|
449
|
+
|
|
450
|
+
```python
|
|
451
|
+
from kuaijs import action
|
|
452
|
+
|
|
453
|
+
# 返回主屏幕
|
|
454
|
+
if action.homeScreen():
|
|
455
|
+
print("成功返回主屏幕")
|
|
456
|
+
|
|
457
|
+
# 在操作完成后返回主屏幕
|
|
458
|
+
def completeTaskAndGoHome():
|
|
459
|
+
# 执行一些操作...
|
|
460
|
+
action.click(200, 300, 100, True)
|
|
461
|
+
|
|
462
|
+
# 返回主屏幕
|
|
463
|
+
action.homeScreen()
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
### pressButton - 按下系统按钮
|
|
467
|
+
|
|
468
|
+
```python
|
|
469
|
+
def pressButton(button: Literal["home", "volumeup", "volumedown"]) -> bool
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
**参数说明:**
|
|
473
|
+
|
|
474
|
+
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
475
|
+
| -------- | ------- | -------- | ------ | ------------------------------------------------------------------------------------------ |
|
|
476
|
+
| `button` | Literal | 是 | - | 按钮类型: <br>-`"home"` Home 键 <br>- `"volumeup"` 音量上键 <br>- `"volumedown"` 音量下键 |
|
|
477
|
+
|
|
478
|
+
**返回值:**
|
|
479
|
+
|
|
480
|
+
| 类型 | 描述 |
|
|
481
|
+
| ------ | ---------------- |
|
|
482
|
+
| `bool` | 按下按钮是否成功 |
|
|
483
|
+
|
|
484
|
+
**示例:**
|
|
485
|
+
|
|
486
|
+
```python
|
|
487
|
+
from kuaijs import action
|
|
488
|
+
|
|
489
|
+
# 按下 Home 键
|
|
490
|
+
action.pressButton("home")
|
|
491
|
+
|
|
492
|
+
# 调高音量
|
|
493
|
+
action.pressButton("volumeup")
|
|
494
|
+
|
|
495
|
+
# 调低音量
|
|
496
|
+
action.pressButton("volumedown")
|
|
497
|
+
|
|
498
|
+
# 连续调节音量
|
|
499
|
+
for i in range(5):
|
|
500
|
+
action.pressButton("volumeup")
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
## 动作构建器
|
|
504
|
+
|
|
505
|
+
ActionBuilder 提供了更高级的多点触控操作能力,支持链式调用构建复杂的手势动作。
|
|
506
|
+
|
|
507
|
+
### createBuilder - 创建 ActionBuilder 构建器
|
|
508
|
+
|
|
509
|
+
```python
|
|
510
|
+
def createBuilder() -> ActionBuilder
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
**返回值:**
|
|
514
|
+
|
|
515
|
+
| 类型 | 描述 |
|
|
516
|
+
| --------------- | ------------------------ |
|
|
517
|
+
| `ActionBuilder` | ActionBuilder 构建器实例 |
|
|
518
|
+
|
|
519
|
+
**示例:**
|
|
520
|
+
|
|
521
|
+
```python
|
|
522
|
+
from kuaijs import action
|
|
523
|
+
builder = action.createBuilder()
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
### ActionBuilder - ActionBuilder 构建器
|
|
527
|
+
|
|
528
|
+
ActionBuilder 构建器支持链式调用,可以构建复杂的多点触控动作。
|
|
529
|
+
|
|
530
|
+
#### addPointer - 添加指针(手指)
|
|
531
|
+
|
|
532
|
+
```python
|
|
533
|
+
def addPointer(id: int) -> PointerBuilder
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
**参数说明:**
|
|
537
|
+
|
|
538
|
+
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
539
|
+
| ------ | ---- | -------- | ------ | ------------------------------------ |
|
|
540
|
+
| `id` | int | 是 | - | 指针编号,1-10,对应设备上的手指编号 |
|
|
541
|
+
|
|
542
|
+
**返回值:**
|
|
543
|
+
|
|
544
|
+
| 类型 | 描述 |
|
|
545
|
+
| ---------------- | -------------------------------- |
|
|
546
|
+
| `PointerBuilder` | 指针构建器,用于配置该指针的动作 |
|
|
547
|
+
|
|
548
|
+
**示例:**
|
|
549
|
+
|
|
550
|
+
```python
|
|
551
|
+
from kuaijs import action
|
|
552
|
+
builder = action.createBuilder()
|
|
553
|
+
# 添加第一个手指
|
|
554
|
+
pointer1 = builder.addPointer(1)
|
|
555
|
+
|
|
556
|
+
# 添加第二个手指
|
|
557
|
+
pointer2 = builder.addPointer(2)
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
#### singleTap - 快速单点点击
|
|
561
|
+
|
|
562
|
+
```python
|
|
563
|
+
def singleTap(x: int, y: int, duration: int = 20) -> ActionBuilder
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
**参数说明:**
|
|
567
|
+
|
|
568
|
+
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
569
|
+
| ---------- | ---- | -------- | ------ | ------------------------------------- |
|
|
570
|
+
| `x` | int | 是 | - | X 坐标 |
|
|
571
|
+
| `y` | int | 是 | - | Y 坐标 |
|
|
572
|
+
| `duration` | int | 否 | 20 | 点击持续时间,如果未定义则默认为 20ms |
|
|
573
|
+
|
|
574
|
+
**返回值:**
|
|
575
|
+
|
|
576
|
+
| 类型 | 描述 |
|
|
577
|
+
| --------------- | ---------------------- |
|
|
578
|
+
| `ActionBuilder` | 返回自身,支持链式调用 |
|
|
579
|
+
|
|
580
|
+
**示例:**
|
|
581
|
+
|
|
582
|
+
```python
|
|
583
|
+
from kuaijs import action
|
|
584
|
+
builder = action.createBuilder()
|
|
585
|
+
# 快速单点点击
|
|
586
|
+
builder.singleTap(100, 100, 50).execute()
|
|
587
|
+
|
|
588
|
+
# 连续点击
|
|
589
|
+
builder.singleTap(100, 100, 30).singleTap(200, 200, 30).execute()
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
#### multiTap - 快速多点点击
|
|
593
|
+
|
|
594
|
+
```python
|
|
595
|
+
def multiTap(points: List[dict], duration: int = 20) -> ActionBuilder
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
**参数说明:**
|
|
599
|
+
|
|
600
|
+
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
601
|
+
| ---------- | ---------- | -------- | ------ | -------------------------------------- |
|
|
602
|
+
| `points` | List[dict] | 是 | - | 点击坐标数组,每个元素包含 x 和 y 坐标 |
|
|
603
|
+
| `duration` | int | 否 | 20 | 点击持续时间,如果未定义则默认为 20ms |
|
|
604
|
+
|
|
605
|
+
**返回值:**
|
|
606
|
+
|
|
607
|
+
| 类型 | 描述 |
|
|
608
|
+
| --------------- | ---------------------- |
|
|
609
|
+
| `ActionBuilder` | 返回自身,支持链式调用 |
|
|
610
|
+
|
|
611
|
+
**示例:**
|
|
612
|
+
|
|
613
|
+
```python
|
|
614
|
+
from kuaijs import action
|
|
615
|
+
builder = action.createBuilder()
|
|
616
|
+
# 多点同时点击
|
|
617
|
+
points = [
|
|
618
|
+
{ "x": 100, "y": 100 },
|
|
619
|
+
{ "x": 200, "y": 200 },
|
|
620
|
+
{ "x": 300, "y": 300 },
|
|
621
|
+
]
|
|
622
|
+
builder.multiTap(points, 50).execute()
|
|
623
|
+
|
|
624
|
+
# 双指点击
|
|
625
|
+
builder.multiTap(
|
|
626
|
+
[
|
|
627
|
+
{ "x": 150, "y": 300 },
|
|
628
|
+
{ "x": 250, "y": 300 },
|
|
629
|
+
],
|
|
630
|
+
100
|
|
631
|
+
).execute()
|
|
632
|
+
```
|
|
633
|
+
|
|
634
|
+
#### execute - 执行动作
|
|
635
|
+
|
|
636
|
+
```python
|
|
637
|
+
def execute() -> bool
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
**返回值:**
|
|
641
|
+
|
|
642
|
+
| 类型 | 描述 |
|
|
643
|
+
| ------ | ------------ |
|
|
644
|
+
| `bool` | 执行是否成功 |
|
|
645
|
+
|
|
646
|
+
**示例:**
|
|
647
|
+
|
|
648
|
+
```python
|
|
649
|
+
from kuaijs import action
|
|
650
|
+
builder = action.createBuilder()
|
|
651
|
+
# 执行构建的动作
|
|
652
|
+
success = builder \
|
|
653
|
+
.addPointer(1) \
|
|
654
|
+
.moveTo(100, 100) \
|
|
655
|
+
.tap(200, 200) \
|
|
656
|
+
.done() \
|
|
657
|
+
.execute()
|
|
658
|
+
|
|
659
|
+
if success:
|
|
660
|
+
print("动作执行成功")
|
|
661
|
+
```
|
|
662
|
+
|
|
663
|
+
### PointerBuilder - 指针构建器
|
|
664
|
+
|
|
665
|
+
指针构建器用于配置单个指针(手指)的动作序列。
|
|
666
|
+
|
|
667
|
+
#### moveTo - 移动到指定坐标
|
|
668
|
+
|
|
669
|
+
```python
|
|
670
|
+
def moveTo(x: int, y: int, duration: int = 0) -> PointerBuilder
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
**参数说明:**
|
|
674
|
+
|
|
675
|
+
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
676
|
+
| ---------- | ---- | -------- | ------ | ------------------------------------ |
|
|
677
|
+
| `x` | int | 是 | - | X 坐标 |
|
|
678
|
+
| `y` | int | 是 | - | Y 坐标 |
|
|
679
|
+
| `duration` | int | 否 | 0 | 移动持续时间,如果未定义则默认为 0ms |
|
|
680
|
+
|
|
681
|
+
**返回值:**
|
|
682
|
+
|
|
683
|
+
| 类型 | 描述 |
|
|
684
|
+
| ---------------- | ---------------------- |
|
|
685
|
+
| `PointerBuilder` | 返回自身,支持链式调用 |
|
|
686
|
+
|
|
687
|
+
#### down - 按下手指
|
|
688
|
+
|
|
689
|
+
```python
|
|
690
|
+
def down() -> PointerBuilder
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
**返回值:**
|
|
694
|
+
|
|
695
|
+
| 类型 | 描述 |
|
|
696
|
+
| ---------------- | ---------------------- |
|
|
697
|
+
| `PointerBuilder` | 返回自身,支持链式调用 |
|
|
698
|
+
|
|
699
|
+
#### up - 抬起手指
|
|
700
|
+
|
|
701
|
+
```python
|
|
702
|
+
def up() -> PointerBuilder
|
|
703
|
+
```
|
|
704
|
+
|
|
705
|
+
**返回值:**
|
|
706
|
+
|
|
707
|
+
| 类型 | 描述 |
|
|
708
|
+
| ---------------- | ---------------------- |
|
|
709
|
+
| `PointerBuilder` | 返回自身,支持链式调用 |
|
|
710
|
+
|
|
711
|
+
#### stay - 停留时间
|
|
712
|
+
|
|
713
|
+
```python
|
|
714
|
+
def stay(duration: int = 20) -> PointerBuilder
|
|
715
|
+
```
|
|
716
|
+
|
|
717
|
+
**参数说明:**
|
|
718
|
+
|
|
719
|
+
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
720
|
+
| ---------- | ---- | -------- | ------ | ----------------------------------------- |
|
|
721
|
+
| `duration` | int | 否 | 20 | 停留时间(毫秒),如果未定义则默认为 20ms |
|
|
722
|
+
|
|
723
|
+
**返回值:**
|
|
724
|
+
|
|
725
|
+
| 类型 | 描述 |
|
|
726
|
+
| ---------------- | ---------------------- |
|
|
727
|
+
| `PointerBuilder` | 返回自身,支持链式调用 |
|
|
728
|
+
|
|
729
|
+
#### tap - 执行点击动作
|
|
730
|
+
|
|
731
|
+
```python
|
|
732
|
+
def tap(x: int, y: int, duration: int = 20) -> PointerBuilder
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
**参数说明:**
|
|
736
|
+
|
|
737
|
+
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
|
|
738
|
+
| ---------- | ---- | -------- | ------ | ------------------------------------- |
|
|
739
|
+
| `x` | int | 是 | - | X 坐标 |
|
|
740
|
+
| `y` | int | 是 | - | Y 坐标 |
|
|
741
|
+
| `duration` | int | 否 | 20 | 按下持续时间,如果未定义则默认为 20ms |
|
|
742
|
+
|
|
743
|
+
**返回值:**
|
|
744
|
+
|
|
745
|
+
| 类型 | 描述 |
|
|
746
|
+
| ---------------- | ---------------------- |
|
|
747
|
+
| `PointerBuilder` | 返回自身,支持链式调用 |
|
|
748
|
+
|
|
749
|
+
**功能说明:**
|
|
750
|
+
|
|
751
|
+
- 自动执行:移动 -> 按下 -> 暂停 -> 抬起的完整点击序列
|
|
752
|
+
|
|
753
|
+
#### done - 完成指针配置
|
|
754
|
+
|
|
755
|
+
```python
|
|
756
|
+
def done() -> ActionBuilder
|
|
757
|
+
```
|
|
758
|
+
|
|
759
|
+
**返回值:**
|
|
760
|
+
|
|
761
|
+
| 类型 | 描述 |
|
|
762
|
+
| --------------- | ---------------------------------- |
|
|
763
|
+
| `ActionBuilder` | 返回主构建器,可以继续添加其他指针 |
|
|
764
|
+
|
|
765
|
+
## 高级使用示例
|
|
766
|
+
|
|
767
|
+
### 单指滑动
|
|
768
|
+
|
|
769
|
+
```python
|
|
770
|
+
from kuaijs import action
|
|
771
|
+
|
|
772
|
+
# 单指从左到右滑动
|
|
773
|
+
builder = action.createBuilder()
|
|
774
|
+
builder \
|
|
775
|
+
.addPointer(1) \
|
|
776
|
+
.moveTo(100, 300, 0) \
|
|
777
|
+
.down() \
|
|
778
|
+
.moveTo(400, 300, 500) \
|
|
779
|
+
.up() \
|
|
780
|
+
.done() \
|
|
781
|
+
.execute()
|
|
782
|
+
```
|
|
783
|
+
|
|
784
|
+
### 双指缩放(放大)
|
|
785
|
+
|
|
786
|
+
```python
|
|
787
|
+
from kuaijs import action
|
|
788
|
+
|
|
789
|
+
# 双指从中心向外扩展
|
|
790
|
+
builder = action.createBuilder()
|
|
791
|
+
builder \
|
|
792
|
+
.addPointer(1) \
|
|
793
|
+
.moveTo(200, 300, 0) \
|
|
794
|
+
.down() \
|
|
795
|
+
.moveTo(150, 250, 300) \
|
|
796
|
+
.up() \
|
|
797
|
+
.done() \
|
|
798
|
+
.addPointer(2) \
|
|
799
|
+
.moveTo(200, 300, 0) \
|
|
800
|
+
.down() \
|
|
801
|
+
.moveTo(250, 350, 300) \
|
|
802
|
+
.up() \
|
|
803
|
+
.done() \
|
|
804
|
+
.execute()
|
|
805
|
+
```
|
|
806
|
+
|
|
807
|
+
### 双指缩放(缩小)
|
|
808
|
+
|
|
809
|
+
```python
|
|
810
|
+
from kuaijs import action
|
|
811
|
+
|
|
812
|
+
# 双指从外向中心收缩
|
|
813
|
+
builder = action.createBuilder()
|
|
814
|
+
builder \
|
|
815
|
+
.addPointer(1) \
|
|
816
|
+
.moveTo(150, 250, 0) \
|
|
817
|
+
.down() \
|
|
818
|
+
.moveTo(200, 300, 300) \
|
|
819
|
+
.up() \
|
|
820
|
+
.done() \
|
|
821
|
+
.addPointer(2) \
|
|
822
|
+
.moveTo(250, 350, 0) \
|
|
823
|
+
.down() \
|
|
824
|
+
.moveTo(200, 300, 300) \
|
|
825
|
+
.up() \
|
|
826
|
+
.done() \
|
|
827
|
+
.execute()
|
|
828
|
+
```
|
|
829
|
+
|
|
830
|
+
### 双指旋转
|
|
831
|
+
|
|
832
|
+
```python
|
|
833
|
+
from kuaijs import action
|
|
834
|
+
|
|
835
|
+
# 双指围绕中心点旋转
|
|
836
|
+
builder = action.createBuilder()
|
|
837
|
+
centerX, centerY = 200, 300
|
|
838
|
+
radius = 50
|
|
839
|
+
|
|
840
|
+
builder \
|
|
841
|
+
.addPointer(1) \
|
|
842
|
+
.moveTo(centerX - radius, centerY, 0) \
|
|
843
|
+
.down() \
|
|
844
|
+
.moveTo(centerX, centerY - radius, 200) \
|
|
845
|
+
.moveTo(centerX + radius, centerY, 200) \
|
|
846
|
+
.up() \
|
|
847
|
+
.done() \
|
|
848
|
+
.addPointer(2) \
|
|
849
|
+
.moveTo(centerX + radius, centerY, 0) \
|
|
850
|
+
.down() \
|
|
851
|
+
.moveTo(centerX, centerY + radius, 200) \
|
|
852
|
+
.moveTo(centerX - radius, centerY, 200) \
|
|
853
|
+
.up() \
|
|
854
|
+
.done() \
|
|
855
|
+
.execute()
|
|
856
|
+
```
|
|
857
|
+
|
|
858
|
+
### 长按拖拽
|
|
859
|
+
|
|
860
|
+
```python
|
|
861
|
+
from kuaijs import action
|
|
862
|
+
|
|
863
|
+
# 长按后拖拽元素
|
|
864
|
+
builder = action.createBuilder()
|
|
865
|
+
builder \
|
|
866
|
+
.addPointer(1) \
|
|
867
|
+
.moveTo(100, 100, 0) \
|
|
868
|
+
.down() \
|
|
869
|
+
.stay(800) \
|
|
870
|
+
.moveTo(300, 400, 1000) \
|
|
871
|
+
.up() \
|
|
872
|
+
.done() \
|
|
873
|
+
.execute()
|
|
874
|
+
```
|
|
875
|
+
|
|
876
|
+
### 复杂手势组合
|
|
877
|
+
|
|
878
|
+
```python
|
|
879
|
+
from kuaijs import action
|
|
880
|
+
|
|
881
|
+
# 先点击,再滑动,最后双击
|
|
882
|
+
builder = action.createBuilder()
|
|
883
|
+
|
|
884
|
+
# 第一步:单击
|
|
885
|
+
builder.singleTap(100, 100, 50)
|
|
886
|
+
|
|
887
|
+
# 第二步:滑动
|
|
888
|
+
builder \
|
|
889
|
+
.addPointer(1) \
|
|
890
|
+
.moveTo(200, 200, 0) \
|
|
891
|
+
.down() \
|
|
892
|
+
.moveTo(400, 200, 600) \
|
|
893
|
+
.up() \
|
|
894
|
+
.done()
|
|
895
|
+
|
|
896
|
+
# 第三步:双击
|
|
897
|
+
builder.multiTap([{ "x": 300, "y": 300 }], 30)
|
|
898
|
+
|
|
899
|
+
# 执行所有动作
|
|
900
|
+
builder.execute()
|
|
901
|
+
```
|