ms-types 0.1.6 → 0.1.8
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/package.json
CHANGED
package/types/image.d.ts
CHANGED
|
@@ -25,7 +25,12 @@ declare namespace image {
|
|
|
25
25
|
* image.saveTo(imageId, "screen.jpg")
|
|
26
26
|
* }
|
|
27
27
|
*/
|
|
28
|
-
function captureRect(
|
|
28
|
+
function captureRect(
|
|
29
|
+
x: number,
|
|
30
|
+
y: number,
|
|
31
|
+
ex: number,
|
|
32
|
+
ey: number
|
|
33
|
+
): string | null;
|
|
29
34
|
/**
|
|
30
35
|
* 保存图片
|
|
31
36
|
* @param imageId 图片id 路径 http地址或者 screen 实时截屏
|
|
@@ -207,9 +212,10 @@ declare namespace image {
|
|
|
207
212
|
* @param threshold 阈值
|
|
208
213
|
* @param limit 限制数量
|
|
209
214
|
* @param method 方法
|
|
215
|
+
* @param rgb 是否使用RGB找图,默认false
|
|
210
216
|
* @returns 图片数组
|
|
211
217
|
* @example
|
|
212
|
-
* const points = image.findImage("screen", "template.jpg", 0, 0, 100, 100, 0.8, 1, 5)
|
|
218
|
+
* const points = image.findImage("screen", "template.jpg", 0, 0, 100, 100, 0.8, 1, 5, false)
|
|
213
219
|
* if (points.length > 0) {
|
|
214
220
|
* logi("找到图片")
|
|
215
221
|
* }
|
|
@@ -223,7 +229,8 @@ declare namespace image {
|
|
|
223
229
|
ey: number,
|
|
224
230
|
threshold: number,
|
|
225
231
|
limit: number,
|
|
226
|
-
method: number
|
|
232
|
+
method: number,
|
|
233
|
+
rgb?: boolean
|
|
227
234
|
): {
|
|
228
235
|
x: number;
|
|
229
236
|
y: number;
|
package/types/node.d.ts
CHANGED
|
@@ -156,15 +156,6 @@ declare class NodeSelector {
|
|
|
156
156
|
* @returns 节点信息
|
|
157
157
|
*/
|
|
158
158
|
getOneNodeInfo(timeout?: number): NodeInfo | null;
|
|
159
|
-
/**
|
|
160
|
-
* 加载节点
|
|
161
|
-
* @param timeout 超时时间,单位毫秒 默认为 5000 毫秒
|
|
162
|
-
*/
|
|
163
|
-
loadNode(timeout?: number): NodeSelector;
|
|
164
|
-
/**
|
|
165
|
-
* 清除条件
|
|
166
|
-
*/
|
|
167
|
-
clearSelector(): NodeSelector;
|
|
168
159
|
/**
|
|
169
160
|
* 获取节点xpath
|
|
170
161
|
* @param path xpath路径
|
|
@@ -214,9 +214,10 @@ declare namespace $图片 {
|
|
|
214
214
|
* @param 阈值 阈值
|
|
215
215
|
* @param 限制数量 限制数量
|
|
216
216
|
* @param 方法 方法
|
|
217
|
+
* @param 是否使用RGB找图 是否使用RGB找图,默认false
|
|
217
218
|
* @returns 图片数组
|
|
218
219
|
* @example
|
|
219
|
-
* const 图片数组 = $图片.找图("screen", "template.jpg", 0, 0, 100, 100, 0.8, 1, 5)
|
|
220
|
+
* const 图片数组 = $图片.找图("screen", "template.jpg", 0, 0, 100, 100, 0.8, 1, 5, false)
|
|
220
221
|
* if (图片数组.length > 0) {
|
|
221
222
|
* $打印信息日志("找到图片")
|
|
222
223
|
* }
|
|
@@ -230,7 +231,8 @@ declare namespace $图片 {
|
|
|
230
231
|
区域右下角y: 数字,
|
|
231
232
|
阈值: 数字,
|
|
232
233
|
限制数量: 数字,
|
|
233
|
-
方法:
|
|
234
|
+
方法: 数字,
|
|
235
|
+
是否使用RGB找图?: 布尔值
|
|
234
236
|
): {
|
|
235
237
|
x: 数字;
|
|
236
238
|
y: 数字;
|
|
@@ -106,18 +106,10 @@ declare interface $节点信息 {
|
|
|
106
106
|
* 子节点数量
|
|
107
107
|
*/
|
|
108
108
|
childCount: 数字;
|
|
109
|
-
/**
|
|
110
|
-
* 点击节点中心
|
|
111
|
-
*/
|
|
112
|
-
clickCenter(): 布尔值;
|
|
113
109
|
/**
|
|
114
110
|
* 点击节点中心
|
|
115
111
|
*/
|
|
116
112
|
点击中心(): 布尔值;
|
|
117
|
-
/**
|
|
118
|
-
* 点击节点随机位置
|
|
119
|
-
*/
|
|
120
|
-
clickRandom(): 布尔值;
|
|
121
113
|
/**
|
|
122
114
|
* 点击节点随机范围
|
|
123
115
|
*/
|
|
@@ -165,15 +157,6 @@ declare class $节点选择器 {
|
|
|
165
157
|
* @returns 节点信息
|
|
166
158
|
*/
|
|
167
159
|
获取一个节点(超时时间?: 数字): $节点信息 | null;
|
|
168
|
-
/**
|
|
169
|
-
* 加载节点
|
|
170
|
-
* @param 超时时间 超时时间,单位毫秒 默认为 5000 毫秒
|
|
171
|
-
*/
|
|
172
|
-
加载节点数据(超时时间?: 数字): $节点选择器;
|
|
173
|
-
/**
|
|
174
|
-
* 清除条件
|
|
175
|
-
*/
|
|
176
|
-
清除所有选择条件(): $节点选择器;
|
|
177
160
|
/**
|
|
178
161
|
* 获取节点xpath
|
|
179
162
|
* @param xpath 节点xpath路径
|