ms-types 0.1.3 → 0.1.7
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/hid.d.ts
CHANGED
|
@@ -215,19 +215,19 @@ declare namespace hid {
|
|
|
215
215
|
function back(): boolean;
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
|
-
*
|
|
218
|
+
* APP 切换器
|
|
219
219
|
* @returns 操作是否成功
|
|
220
220
|
*/
|
|
221
221
|
function recent(): boolean;
|
|
222
222
|
|
|
223
223
|
/**
|
|
224
|
-
*
|
|
224
|
+
* 锁屏
|
|
225
225
|
* @returns 操作是否成功
|
|
226
226
|
*/
|
|
227
227
|
function lock(): boolean;
|
|
228
228
|
|
|
229
229
|
/**
|
|
230
|
-
*
|
|
230
|
+
* 解锁
|
|
231
231
|
* @returns 操作是否成功
|
|
232
232
|
*/
|
|
233
233
|
function unlock(): boolean;
|
|
@@ -279,4 +279,11 @@ declare namespace hid {
|
|
|
279
279
|
* @returns 剪切板内容
|
|
280
280
|
*/
|
|
281
281
|
function getClipboard(): string | null;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* 执行自定义按钮
|
|
285
|
+
* @param button 自定义按钮 5-11 对应 自定义快捷键 5-11
|
|
286
|
+
* @returns 操作是否成功
|
|
287
|
+
*/
|
|
288
|
+
function customButton(button: number): boolean;
|
|
282
289
|
}
|
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;
|
|
@@ -219,13 +219,13 @@ declare namespace $HID {
|
|
|
219
219
|
function 返回(): 布尔值;
|
|
220
220
|
|
|
221
221
|
/**
|
|
222
|
-
*
|
|
222
|
+
* APP 切换器
|
|
223
223
|
* @returns 操作是否成功
|
|
224
224
|
*/
|
|
225
225
|
function 最近应用(): 布尔值;
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
|
-
*
|
|
228
|
+
* 锁屏
|
|
229
229
|
* @returns 操作是否成功
|
|
230
230
|
*/
|
|
231
231
|
function 锁屏(): 布尔值;
|
|
@@ -283,4 +283,11 @@ declare namespace $HID {
|
|
|
283
283
|
* @returns 剪切板内容
|
|
284
284
|
*/
|
|
285
285
|
function 获取剪切板内容(): 字符串 | null;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* 执行自定义按钮
|
|
289
|
+
* @param button 自定义按钮 5-11 对应 自定义快捷键 5-11
|
|
290
|
+
* @returns 操作是否成功
|
|
291
|
+
*/
|
|
292
|
+
function 执行自定义按钮(button: 数字): 布尔值;
|
|
286
293
|
}
|
|
@@ -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
|
*/
|