deeke-script-app 1.3.3 → 1.3.5
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/@deekeScript/@type/Class/UiSelector.d.ts +191 -191
- package/@deekeScript/@type/interface/Access.d.ts +61 -0
- package/@deekeScript/@type/interface/Engines.d.ts +29 -29
- package/@deekeScript/@type/interface/Http.d.ts +41 -41
- package/@deekeScript/@type/interface/Images.d.ts +35 -35
- package/@deekeScript/@type/interface/Java.d.ts +7 -7
- package/@deekeScript/@type/interface/Log.d.ts +16 -16
- package/@deekeScript/@type/interface/Storage.d.ts +110 -110
- package/@deekeScript/@type/interface/System.d.ts +1 -1
- package/@deekeScript/@type/interface/WebSocket.d.ts +44 -0
- package/README.md +35 -35
- package/deekeScript.json +598 -598
- package/deekeScriptZipBuild +48 -48
- package/gulpfile +17 -17
- package/images/test/statistics.png +0 -0
- package/init +32 -32
- package/jsconfig.json +11 -11
- package/package.json +41 -41
- package/script/index.js +0 -1
- package/script/statistics/statistics.js +120 -120
- package/script/task/dy.js +7 -14
- package/script/task/dyApp.js +7 -7
- package/script/task/dyCity.js +1 -1
- package/script/task/tool.js +10 -19
- package/script/task.html +4 -4
- package/src/statistics/statistics.js +120 -120
- package/src/task/dy.js +14 -14
- package/src/task/dyApp.js +7 -7
- package/src/task/tool.js +19 -19
- package/src/task.html +4 -4
- package/test/Access.js +10 -0
- package/test/console.js +5 -5
- package/test/device.js +11 -8
- package/test/encrypt.js +3 -3
- package/test/engines.js +5 -5
- package/test/extension.js +27 -27
- package/test/files.js +7 -7
- package/test/http.js +4 -4
- package/test/images/findColor.js +10 -10
- package/test/java.js +6 -6
- package/test/log.js +10 -10
- package/test/module/module.js +4 -4
- package/test/package.js +3 -3
- package/test/permise.js +14 -14
- package/test/thread.js +11 -11
- package/test/timer.close.js +27 -27
- package/test/timer.js +25 -25
- package/test/timer.stop.js +28 -28
- package/test/webSocket.js +21 -0
- package/uglify-config.json +15 -15
|
@@ -1,191 +1,191 @@
|
|
|
1
|
-
|
|
2
|
-
declare global {
|
|
3
|
-
function UiSelector(simpleMode?: boolean): UiSelector;
|
|
4
|
-
/**
|
|
5
|
-
* 控件选择器
|
|
6
|
-
*/
|
|
7
|
-
class UiSelector {
|
|
8
|
-
//public setLevel(level: number): UiSelector; //这个方法待完善
|
|
9
|
-
//public getLevel(): number;//这个方法待完善
|
|
10
|
-
public UiSelector(): void;//使用new UiSelector() 或者 UiSelector() 都可以实例化选择器
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @param text 控件文本
|
|
15
|
-
*/
|
|
16
|
-
public text(text: string): UiSelector;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @param text 模糊匹配文本控件
|
|
21
|
-
*/
|
|
22
|
-
public textContains(text: string): UiSelector;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @param text 正则匹配文本控件
|
|
27
|
-
*/
|
|
28
|
-
public textMatches(text: string): UiSelector;
|
|
29
|
-
|
|
30
|
-
//public textStartsWith(text: string): UiSelector;
|
|
31
|
-
//public textEndsWith(text: string): UiSelector;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
*
|
|
35
|
-
* @param desc 控件描述内容
|
|
36
|
-
*/
|
|
37
|
-
public desc(desc: string): UiSelector;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
*
|
|
41
|
-
* @param desc 模糊匹配描述控件
|
|
42
|
-
*/
|
|
43
|
-
public descContains(desc: string): UiSelector;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @param desc 正则表达式匹配描述控件
|
|
48
|
-
*/
|
|
49
|
-
public descMatches(desc: string): UiSelector;
|
|
50
|
-
//public descStartsWith(desc: string): UiSelector;
|
|
51
|
-
//public descEndsWith(desc: string): UiSelector;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
*
|
|
55
|
-
* @param className 控件类名
|
|
56
|
-
*/
|
|
57
|
-
public className(className: string): UiSelector;
|
|
58
|
-
//public classNameMatches(className: string): UiSelector;
|
|
59
|
-
|
|
60
|
-
// public packageName(packageName: string): UiSelector;
|
|
61
|
-
//public packageNameMatches(packageName: string): UiSelector;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
*
|
|
65
|
-
* @param id 控件ID
|
|
66
|
-
*/
|
|
67
|
-
public id(id: string): UiSelector;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
*
|
|
71
|
-
* @param left 左边距 整数
|
|
72
|
-
* @param top 上边距 整数
|
|
73
|
-
* @param right 右边距 整数
|
|
74
|
-
* @param bottom 下边距 整数
|
|
75
|
-
*/
|
|
76
|
-
public bounds(left: Number, top: Number, right: Number, bottom: Number): UiSelector;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
*
|
|
80
|
-
* @param bool 是否可以点击
|
|
81
|
-
*/
|
|
82
|
-
public clickable(bool: boolean): UiSelector;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
*
|
|
86
|
-
* @param bool 是否选中
|
|
87
|
-
*/
|
|
88
|
-
public checked(bool: boolean): UiSelector;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
*
|
|
92
|
-
* @param bool 是否被选择
|
|
93
|
-
*/
|
|
94
|
-
public selected(bool: boolean): UiSelector;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
*
|
|
98
|
-
* @param bool 是否可用,为false时,用户无法通过点击、输入等方式与该控件交互
|
|
99
|
-
*/
|
|
100
|
-
public enabled(bool: boolean): UiSelector;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
*
|
|
104
|
-
* @param bool 是否已被勾选
|
|
105
|
-
*/
|
|
106
|
-
public checked(bool: boolean): UiSelector;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
*
|
|
110
|
-
* @param bool 是否可以滚动
|
|
111
|
-
*/
|
|
112
|
-
public scrollable(bool: boolean): UiSelector;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
*
|
|
116
|
-
* @param bool 是否可以勾选
|
|
117
|
-
*/
|
|
118
|
-
public checkable(bool: boolean): UiSelector;
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
*
|
|
122
|
-
* @param bool 是否可以聚焦
|
|
123
|
-
*/
|
|
124
|
-
public focusable(bool: boolean): UiSelector;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
*
|
|
128
|
-
* @param bool 是否可见
|
|
129
|
-
*/
|
|
130
|
-
public isVisibleToUser(bool: boolean): UiSelector;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
*
|
|
134
|
-
* @param filter 过滤控件,回调函数,返回true表示符合条件,返回false表示不符合条件
|
|
135
|
-
*/
|
|
136
|
-
public filter(filter: (v: UiObject) => boolean): UiSelector;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* 判断节点是否存在,底层使用的findOne方法
|
|
140
|
-
*/
|
|
141
|
-
public exists(): boolean;
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
*
|
|
145
|
-
* 等待节点出现,一直阻塞直到找到节点
|
|
146
|
-
*/
|
|
147
|
-
public waitFindOne(): UiObject;
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* 查找所有符合条件的控件
|
|
151
|
-
*/
|
|
152
|
-
public find(): UiObject[];
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* 在当前的所有控件对象中查找所有符合某个控件选择器的控件
|
|
156
|
-
* @param obj 控件选择器
|
|
157
|
-
*/
|
|
158
|
-
public findBy(obj: UiSelector): UiObject[];
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* 查找某个控件选择器,在timeout时间内,如果找不到,则返回null;如果找到立马返回
|
|
162
|
-
* @param timeout 查找时间(毫秒数)
|
|
163
|
-
*/
|
|
164
|
-
public findBy(timeout: Number): UiObject[];
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* 返回一个符合当前选择器条件的控件
|
|
168
|
-
*/
|
|
169
|
-
public findOne(): UiObject;
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* 返回一个符合当前选择器条件的控件
|
|
173
|
-
*/
|
|
174
|
-
public findOnce(): UiObject;
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* 返回一个符合当前控件选择的控件
|
|
178
|
-
* @param obj 控件选择器
|
|
179
|
-
*/
|
|
180
|
-
public findOneBy(obj: UiSelector): UiObject;
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* 查找某个控件选择器,在timeout时间内,如果找不到,则返回null;如果找到立马返回
|
|
184
|
-
* @param timeout 查找时间(毫秒数)
|
|
185
|
-
*/
|
|
186
|
-
public findOneBy(timeout: Number): UiObject;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
export {};
|
|
1
|
+
|
|
2
|
+
declare global {
|
|
3
|
+
function UiSelector(simpleMode?: boolean): UiSelector;
|
|
4
|
+
/**
|
|
5
|
+
* 控件选择器
|
|
6
|
+
*/
|
|
7
|
+
class UiSelector {
|
|
8
|
+
//public setLevel(level: number): UiSelector; //这个方法待完善
|
|
9
|
+
//public getLevel(): number;//这个方法待完善
|
|
10
|
+
public UiSelector(): void;//使用new UiSelector() 或者 UiSelector() 都可以实例化选择器
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @param text 控件文本
|
|
15
|
+
*/
|
|
16
|
+
public text(text: string): UiSelector;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @param text 模糊匹配文本控件
|
|
21
|
+
*/
|
|
22
|
+
public textContains(text: string): UiSelector;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param text 正则匹配文本控件
|
|
27
|
+
*/
|
|
28
|
+
public textMatches(text: string): UiSelector;
|
|
29
|
+
|
|
30
|
+
//public textStartsWith(text: string): UiSelector;
|
|
31
|
+
//public textEndsWith(text: string): UiSelector;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @param desc 控件描述内容
|
|
36
|
+
*/
|
|
37
|
+
public desc(desc: string): UiSelector;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @param desc 模糊匹配描述控件
|
|
42
|
+
*/
|
|
43
|
+
public descContains(desc: string): UiSelector;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @param desc 正则表达式匹配描述控件
|
|
48
|
+
*/
|
|
49
|
+
public descMatches(desc: string): UiSelector;
|
|
50
|
+
//public descStartsWith(desc: string): UiSelector;
|
|
51
|
+
//public descEndsWith(desc: string): UiSelector;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @param className 控件类名
|
|
56
|
+
*/
|
|
57
|
+
public className(className: string): UiSelector;
|
|
58
|
+
//public classNameMatches(className: string): UiSelector;
|
|
59
|
+
|
|
60
|
+
// public packageName(packageName: string): UiSelector;
|
|
61
|
+
//public packageNameMatches(packageName: string): UiSelector;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @param id 控件ID
|
|
66
|
+
*/
|
|
67
|
+
public id(id: string): UiSelector;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @param left 左边距 整数
|
|
72
|
+
* @param top 上边距 整数
|
|
73
|
+
* @param right 右边距 整数
|
|
74
|
+
* @param bottom 下边距 整数
|
|
75
|
+
*/
|
|
76
|
+
public bounds(left: Number, top: Number, right: Number, bottom: Number): UiSelector;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @param bool 是否可以点击
|
|
81
|
+
*/
|
|
82
|
+
public clickable(bool: boolean): UiSelector;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @param bool 是否选中
|
|
87
|
+
*/
|
|
88
|
+
public checked(bool: boolean): UiSelector;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @param bool 是否被选择
|
|
93
|
+
*/
|
|
94
|
+
public selected(bool: boolean): UiSelector;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* @param bool 是否可用,为false时,用户无法通过点击、输入等方式与该控件交互
|
|
99
|
+
*/
|
|
100
|
+
public enabled(bool: boolean): UiSelector;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @param bool 是否已被勾选
|
|
105
|
+
*/
|
|
106
|
+
public checked(bool: boolean): UiSelector;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @param bool 是否可以滚动
|
|
111
|
+
*/
|
|
112
|
+
public scrollable(bool: boolean): UiSelector;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @param bool 是否可以勾选
|
|
117
|
+
*/
|
|
118
|
+
public checkable(bool: boolean): UiSelector;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* @param bool 是否可以聚焦
|
|
123
|
+
*/
|
|
124
|
+
public focusable(bool: boolean): UiSelector;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
*
|
|
128
|
+
* @param bool 是否可见
|
|
129
|
+
*/
|
|
130
|
+
public isVisibleToUser(bool: boolean): UiSelector;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
* @param filter 过滤控件,回调函数,返回true表示符合条件,返回false表示不符合条件
|
|
135
|
+
*/
|
|
136
|
+
public filter(filter: (v: UiObject) => boolean): UiSelector;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* 判断节点是否存在,底层使用的findOne方法
|
|
140
|
+
*/
|
|
141
|
+
public exists(): boolean;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
*
|
|
145
|
+
* 等待节点出现,一直阻塞直到找到节点
|
|
146
|
+
*/
|
|
147
|
+
public waitFindOne(): UiObject;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* 查找所有符合条件的控件
|
|
151
|
+
*/
|
|
152
|
+
public find(): UiObject[];
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* 在当前的所有控件对象中查找所有符合某个控件选择器的控件
|
|
156
|
+
* @param obj 控件选择器
|
|
157
|
+
*/
|
|
158
|
+
public findBy(obj: UiSelector): UiObject[];
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* 查找某个控件选择器,在timeout时间内,如果找不到,则返回null;如果找到立马返回
|
|
162
|
+
* @param timeout 查找时间(毫秒数)
|
|
163
|
+
*/
|
|
164
|
+
public findBy(timeout: Number): UiObject[];
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* 返回一个符合当前选择器条件的控件
|
|
168
|
+
*/
|
|
169
|
+
public findOne(): UiObject;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* 返回一个符合当前选择器条件的控件
|
|
173
|
+
*/
|
|
174
|
+
public findOnce(): UiObject;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* 返回一个符合当前控件选择的控件
|
|
178
|
+
* @param obj 控件选择器
|
|
179
|
+
*/
|
|
180
|
+
public findOneBy(obj: UiSelector): UiObject;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* 查找某个控件选择器,在timeout时间内,如果找不到,则返回null;如果找到立马返回
|
|
184
|
+
* @param timeout 查找时间(毫秒数)
|
|
185
|
+
*/
|
|
186
|
+
public findOneBy(timeout: Number): UiObject;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
global {
|
|
2
|
+
var Access: access;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
console.log(Access.isAccessibilityServiceEnabled());
|
|
8
|
+
console.log(Access.isFloatWindowsEnabled());
|
|
9
|
+
console.log(Access.isBackgroundAlertEnabled());
|
|
10
|
+
console.log(Access.isMediaProjectionEnable());
|
|
11
|
+
|
|
12
|
+
//console.log(Access.backgroundAlertSetting());
|
|
13
|
+
//console.log(Access.openAccessibilityServiceSetting());
|
|
14
|
+
//console.log(Access.openFloatWindowsSetting());
|
|
15
|
+
//console.log(Access.mediaProjectionSetting());
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
*/
|
|
19
|
+
interface access {
|
|
20
|
+
/**
|
|
21
|
+
* 是否开启了无障碍权限
|
|
22
|
+
*/
|
|
23
|
+
public isAccessibilityServiceEnabled(): boolean;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 是否开启了悬浮窗权限
|
|
27
|
+
*/
|
|
28
|
+
public isFloatWindowsEnabled(): boolean;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 是否开启了后台弹窗权限
|
|
32
|
+
*/
|
|
33
|
+
public isBackgroundAlertEnabled(): boolean;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 是否开启了截图录屏权限
|
|
37
|
+
*/
|
|
38
|
+
public isMediaProjectionEnable(): boolean;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 开启了无障碍权限设置界面
|
|
42
|
+
*/
|
|
43
|
+
public openAccessibilityServiceSetting(): void;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 开启了悬浮窗权限设置界面
|
|
47
|
+
*/
|
|
48
|
+
public openFloatWindowsSetting(): void;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 开启了后台弹窗权限设置界面
|
|
52
|
+
*/
|
|
53
|
+
public openBackgroundAlertSetting(): void;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 开启了截图录屏权限设置界面
|
|
57
|
+
*/
|
|
58
|
+
public openMediaProjectionSetting(): void;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { };
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
var Engines: Engines;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
interface Engines {
|
|
6
|
-
/**
|
|
7
|
-
* 执行脚本
|
|
8
|
-
* @param file 文件路径,相对根目录的路径
|
|
9
|
-
*/
|
|
10
|
-
public executeScript(file: string): void;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 执行脚本
|
|
14
|
-
* @param content 脚本内容
|
|
15
|
-
*/
|
|
16
|
-
public executeScriptStr(content: string): void;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* 关闭所有脚本
|
|
20
|
-
*/
|
|
21
|
-
public closeAll(): void;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* 关闭当前脚本之外的其他脚本
|
|
25
|
-
*/
|
|
26
|
-
public closeOther(): void
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export { };
|
|
1
|
+
declare global {
|
|
2
|
+
var Engines: Engines;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface Engines {
|
|
6
|
+
/**
|
|
7
|
+
* 执行脚本
|
|
8
|
+
* @param file 文件路径,相对根目录的路径
|
|
9
|
+
*/
|
|
10
|
+
public executeScript(file: string): void;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* 执行脚本
|
|
14
|
+
* @param content 脚本内容
|
|
15
|
+
*/
|
|
16
|
+
public executeScriptStr(content: string): void;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 关闭所有脚本
|
|
20
|
+
*/
|
|
21
|
+
public closeAll(): void;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 关闭当前脚本之外的其他脚本
|
|
25
|
+
*/
|
|
26
|
+
public closeOther(): void
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { };
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
var Http: Http;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
interface Http {
|
|
6
|
-
/**
|
|
7
|
-
* post请求 {"Content-Type":"application/json"}
|
|
8
|
-
* @param url 请求地址
|
|
9
|
-
* @param json 请求内容,请使用JOSN.parse()将对象处理成字符串
|
|
10
|
-
*/
|
|
11
|
-
public post(url: string, json: object): string;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @param url 请求地址
|
|
16
|
-
* @param json 请求内容
|
|
17
|
-
* @param headers 请求头n的请求头,如:{"Content-Type":"application/json"}
|
|
18
|
-
*/
|
|
19
|
-
public postHeaders(url: string, json: object, headers: object): string | null;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* get请求
|
|
23
|
-
* @param url 请求地址
|
|
24
|
-
*/
|
|
25
|
-
public get(url: string): string;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* 带请求头的get请求
|
|
29
|
-
* @param url 请求地址
|
|
30
|
-
* @param headers 请求头
|
|
31
|
-
*/
|
|
32
|
-
public getHeaders(url: string, headers: object): string | null;
|
|
33
|
-
|
|
34
|
-
//下面的方法,暂时还没使用过
|
|
35
|
-
// public postFile(url: string, files: string[], params: object, httpCallback: {
|
|
36
|
-
// success: (response: object) => void,
|
|
37
|
-
// error: (response: object) => void
|
|
38
|
-
// }): boolean;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export { };
|
|
1
|
+
declare global {
|
|
2
|
+
var Http: Http;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface Http {
|
|
6
|
+
/**
|
|
7
|
+
* post请求 {"Content-Type":"application/json"}
|
|
8
|
+
* @param url 请求地址
|
|
9
|
+
* @param json 请求内容,请使用JOSN.parse()将对象处理成字符串
|
|
10
|
+
*/
|
|
11
|
+
public post(url: string, json: object): string;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param url 请求地址
|
|
16
|
+
* @param json 请求内容
|
|
17
|
+
* @param headers 请求头n的请求头,如:{"Content-Type":"application/json"}
|
|
18
|
+
*/
|
|
19
|
+
public postHeaders(url: string, json: object, headers: object): string | null;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* get请求
|
|
23
|
+
* @param url 请求地址
|
|
24
|
+
*/
|
|
25
|
+
public get(url: string): string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 带请求头的get请求
|
|
29
|
+
* @param url 请求地址
|
|
30
|
+
* @param headers 请求头
|
|
31
|
+
*/
|
|
32
|
+
public getHeaders(url: string, headers: object): string | null;
|
|
33
|
+
|
|
34
|
+
//下面的方法,暂时还没使用过
|
|
35
|
+
// public postFile(url: string, files: string[], params: object, httpCallback: {
|
|
36
|
+
// success: (response: object) => void,
|
|
37
|
+
// error: (response: object) => void
|
|
38
|
+
// }): boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { };
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
var Images: Images;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
interface Mat {
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface Point {
|
|
9
|
-
x: number;
|
|
10
|
-
y: number;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface Images {
|
|
14
|
-
public getMat(imageFile: string): Mat;
|
|
15
|
-
|
|
16
|
-
public findOne(source: Mat, template: Mat, threshold: number): Point;
|
|
17
|
-
|
|
18
|
-
public find(source: Mat, template: Mat, threshold: number): Point[];
|
|
19
|
-
|
|
20
|
-
public capture(): string;
|
|
21
|
-
|
|
22
|
-
public getColor(imageFile: string, pixelX: number, pixelY: number): string;
|
|
23
|
-
|
|
24
|
-
public findColor(imageFile: string, color: string): Point[];
|
|
25
|
-
|
|
26
|
-
public findColor(imageFile: string, startColor: string, endColor: string): Point[];
|
|
27
|
-
|
|
28
|
-
public crop(imageFile: string, left: number, top: number, width: number, height: number): string;
|
|
29
|
-
|
|
30
|
-
public scale(imageFile: string, multiple: number): string;
|
|
31
|
-
|
|
32
|
-
public getText(imageFile: string): string[];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export { };
|
|
1
|
+
declare global {
|
|
2
|
+
var Images: Images;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface Mat {
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface Point {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface Images {
|
|
14
|
+
public getMat(imageFile: string): Mat;
|
|
15
|
+
|
|
16
|
+
public findOne(source: Mat, template: Mat, threshold: number): Point;
|
|
17
|
+
|
|
18
|
+
public find(source: Mat, template: Mat, threshold: number): Point[];
|
|
19
|
+
|
|
20
|
+
public capture(): string;
|
|
21
|
+
|
|
22
|
+
public getColor(imageFile: string, pixelX: number, pixelY: number): string;
|
|
23
|
+
|
|
24
|
+
public findColor(imageFile: string, color: string): Point[];
|
|
25
|
+
|
|
26
|
+
public findColor(imageFile: string, startColor: string, endColor: string): Point[];
|
|
27
|
+
|
|
28
|
+
public crop(imageFile: string, left: number, top: number, width: number, height: number): string;
|
|
29
|
+
|
|
30
|
+
public scale(imageFile: string, multiple: number): string;
|
|
31
|
+
|
|
32
|
+
public getText(imageFile: string): string[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
var java: any;
|
|
3
|
-
var Packages: any;
|
|
4
|
-
function JavaImporter(...packages: any[]): any;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export { };
|
|
1
|
+
declare global {
|
|
2
|
+
var java: any;
|
|
3
|
+
var Packages: any;
|
|
4
|
+
function JavaImporter(...packages: any[]): any;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export { };
|