-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathSystem.d.ts
More file actions
114 lines (95 loc) · 2.45 KB
/
Copy pathSystem.d.ts
File metadata and controls
114 lines (95 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
declare global {
var System: System;
}
interface System {
/**
* 休眠
* @param milliSecond 毫秒
*/
public sleep(milliSecond: number): void;
/**
* 释放内存
*/
public gc(): void;
/**
* 获取当前时间 yyyy-MM-dd HH:mm:ss.SSS 格式
*/
public time(): string;
/**
* 获取当前Activity
*/
public currentActivity(): string;
/**
* 获取当前包名
*/
public currentPackage(): string;
/**
* 将内容设置到剪切板中
* @param text 剪切板内容
*/
public setClip(text: string): void;
/**
* 获取剪切板内容
*/
public getClip(): string;
/**
* 吐司
* @param text 显示文本
*/
public toast(text: string): void;
/**
* 吐司(显示时间较长)
* @param text 显示文本
*/
public toastLong(text: string): void;
/**
*
* @param activity 等待的Activity
* @param period 每次时间间隔
* @param timeout 等待的总时间
*/
public waitForActivity(activity: string, period: number, timeout: number): boolean;
/**
*
* @param activity 等待的PackageName的App启动
* @param period 每次时间间隔
* @param timeout 等待的总时间
*/
public waitForPackage(packageName: string, period: number, timeout: number): boolean;
/**
* 停止所有脚本
*/
public exit(): void;
/**
* 缓存清理
*/
public cleanUp(): void;
/**
* 获取智能话术token
* @param key 智能话术key
* @param secret 智能话术secret
*/
public AiSpeechToken(key: string, secret: string): string;
/**
* 生成窗口元素,使用App的上传日志,可以拿到文件
*/
public generateWindowElements(): void;
/**
* 获取接口返回的内容
* @param key
* @param dataForm
* @param content
*/
public getDataFrom(key: string, dataForm: string, content: string): string | null;
/**
* 是否显示时间悬浮窗窗口
* @param show 是否显示
*/
public setTimeWindowShow(show: boolean);
/**
* 切换无障碍模式,快速模式下,将自动过滤非重要控件。注意通过id或者text方式获取控件不受此模式影响;
* @param mode 快速模式mode为fast,非快速模式为!fast
*/
public setAccessibilityMode(mode: string);
}
export { };