ms-types 0.0.38 → 0.0.40
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 +1 -1
- package/types/action.d.ts +21 -1
- package/types/image.d.ts +3 -11
package/package.json
CHANGED
package/types/action.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ declare namespace action {
|
|
|
81
81
|
* @param duration 持续时间 默认20ms
|
|
82
82
|
* @param interval 双击间隔时间 默认20ms
|
|
83
83
|
* @returns 随机双击是否成功
|
|
84
|
-
* @example action.doubleClickRandom(100, 100, 200, 200, 20, 20)
|
|
84
|
+
* @example action.doubleClickRandom(100, 100, 200, 200, 20, 20)
|
|
85
85
|
*/
|
|
86
86
|
function doubleClickRandom(
|
|
87
87
|
x1: number,
|
|
@@ -138,6 +138,26 @@ declare namespace action {
|
|
|
138
138
|
endY: number,
|
|
139
139
|
duration?: number
|
|
140
140
|
): boolean;
|
|
141
|
+
/**
|
|
142
|
+
* 输入文本
|
|
143
|
+
* @param text 文本内容
|
|
144
|
+
* @returns 输入文本是否成功
|
|
145
|
+
* @example action.input("123456")
|
|
146
|
+
*/
|
|
147
|
+
function input(text: string): boolean;
|
|
148
|
+
/**
|
|
149
|
+
* 删除文本
|
|
150
|
+
* @param count 删除数量 默认为1
|
|
151
|
+
* @returns 删除文本是否成功
|
|
152
|
+
* @example action.backspace(1)
|
|
153
|
+
*/
|
|
154
|
+
function backspace(count?: number): boolean;
|
|
155
|
+
/**
|
|
156
|
+
* 调用回车
|
|
157
|
+
* @returns 调用回车是否成功
|
|
158
|
+
* @example action.enter()
|
|
159
|
+
*/
|
|
160
|
+
function enter(): boolean;
|
|
141
161
|
/**
|
|
142
162
|
* 返回首页
|
|
143
163
|
* @returns 返回首页是否成功
|
package/types/image.d.ts
CHANGED
|
@@ -203,18 +203,10 @@ declare namespace image {
|
|
|
203
203
|
* @param method 方法
|
|
204
204
|
* @returns 图片数组
|
|
205
205
|
* @example
|
|
206
|
-
* const
|
|
207
|
-
* if (
|
|
208
|
-
*
|
|
209
|
-
* if (templateImageId) {
|
|
210
|
-
* const points = image.findImage(imageId, templateImageId, 0, 0, 100, 100, 0.8, 1, 0)
|
|
211
|
-
* if (points.length > 0) {
|
|
212
|
-
* logger.info("找到图片")
|
|
213
|
-
* }
|
|
214
|
-
* }
|
|
215
|
-
* image.release(templateImageId)
|
|
206
|
+
* const points = image.findImage("screen", "template.png", 0, 0, 100, 100, 0.8, 1, 5)
|
|
207
|
+
* if (points.length > 0) {
|
|
208
|
+
* logger.info("找到图片")
|
|
216
209
|
* }
|
|
217
|
-
* image.release(imageId)
|
|
218
210
|
*/
|
|
219
211
|
function findImage(
|
|
220
212
|
imageId: string,
|