deeke-script-app 1.6.5 → 1.6.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/@deekeScript/@type/interface/App.d.ts +93 -93
- package/@deekeScript/@type/interface/DeekeScriptJson.d.ts +13 -13
- package/@deekeScript/@type/interface/Storage.d.ts +110 -110
- package/@deekeScript/@type/interface/UiObject.d.ts +6 -1
- package/package.json +6 -5
- package/script/task/douyin_zan.js +37 -37
- package/script/task/dy.js +6 -6
- package/script/task/dyApp.js +6 -6
- package/script/task/tool.js +9 -9
- package/script/9/common/util.js +0 -20
- package/script/9/dy/common/common.js +0 -10
- package/script/9/dy/common/version.js +0 -4
- package/script/9/dy/common/video.js +0 -8
- package/script/9/dy/task/taskOne.js +0 -7
- package/script/9/dy/version/310701.js +0 -7
- package/script/test/2.js +0 -1
- package/script/test/5.js +0 -3
- package/script/test/8.js +0 -17
- package/src/12/main.js +0 -40
- package/src/12/task.js +0 -10
- package/src/9/common/util.js +0 -28
- package/src/9/dy/common/common.js +0 -13
- package/src/9/dy/common/version.js +0 -12
- package/src/9/dy/common/video.js +0 -14
- package/src/9/dy/task/taskOne.js +0 -13
- package/src/9/dy/version/310701.js +0 -7
- package/src/test/2.js +0 -2
- package/src/test/5.js +0 -4
- package/src/test/8.js +0 -36
- package/test/2.0/engines/enginesSimple.js +0 -72
- package/test/2.js +0 -6
- package/test/Access.js +0 -10
- package/test/SocketIOClient.js +0 -39
- package/test/SocketIOServer.js +0 -49
- package/test/Storage.js +0 -3
- package/test/augment/test.js +0 -0
- package/test/console.js +0 -5
- package/test/deekeScriptJson.js +0 -5
- package/test/device.js +0 -11
- package/test/encrypt.js +0 -4
- package/test/engines/1.js +0 -4
- package/test/engines/eng/1.js +0 -8
- package/test/engines/engines.js +0 -6
- package/test/engines/relative.dir.js +0 -8
- package/test/engines/relative.js +0 -1
- package/test/engines/test.js +0 -6
- package/test/engines.js +0 -5
- package/test/extension.js +0 -27
- package/test/files.js +0 -7
- package/test/foreground.js +0 -23
- package/test/http.js +0 -19
- package/test/images/findColor.js +0 -15
- package/test/java.js +0 -28
- package/test/log.js +0 -10
- package/test/module/module.js +0 -5
- package/test/notification.js +0 -26
- package/test/package.js +0 -3
- package/test/permise.js +0 -29
- package/test/thread.js +0 -11
- package/test/timer.close.js +0 -27
- package/test/timer.js +0 -25
- package/test/timer.stop.js +0 -28
- package/test/webSocket.js +0 -22
- /package/@deekeScript/@type/interface/{SocketIoClient.d.ts → SocketIOClient.d.ts} +0 -0
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
var App: App;
|
|
3
|
-
|
|
4
|
-
interface App {
|
|
5
|
-
/**
|
|
6
|
-
* 获取当前包名
|
|
7
|
-
*/
|
|
8
|
-
public currentPackageName(): string;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* 获取当前版本号
|
|
12
|
-
*/
|
|
13
|
-
public currentVersionCode(): number;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* 获取当前版本名称
|
|
17
|
-
*/
|
|
18
|
-
public currentVersionName(): string;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* 获取包信息
|
|
22
|
-
*/
|
|
23
|
-
public packageInfo(): any;//这里是返回的PackageInfo(Android对象)
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* 创建一个Intent对象
|
|
27
|
-
* @param i Intent对象
|
|
28
|
-
*/
|
|
29
|
-
public intent(i: Intent): Intent;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* 调整到某个Activity
|
|
33
|
-
* @param uri 跳转的uri
|
|
34
|
-
*/
|
|
35
|
-
public gotoIntent(uri: string): void;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* 启动Activity
|
|
39
|
-
* @param intent Intent对象
|
|
40
|
-
*/
|
|
41
|
-
public startActivity(intent: Intent): void;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* 返回到App
|
|
45
|
-
*/
|
|
46
|
-
public backApp(): void;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* 启动服务
|
|
50
|
-
* @param service Intent对象
|
|
51
|
-
*/
|
|
52
|
-
public startService(service: Intent): any;//这里的参数和返回都是ComponentName(Android对象)
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* 发送广播
|
|
56
|
-
* @param intent Intent对象
|
|
57
|
-
*/
|
|
58
|
-
public sendBroadcast(intent: Intent): void;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* 通过包名,打开某个App
|
|
62
|
-
* @param packageName 包名
|
|
63
|
-
*/
|
|
64
|
-
public launch(packageName: string): void;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* 通知
|
|
68
|
-
* @param title 标题
|
|
69
|
-
* @param content 内容
|
|
70
|
-
*/
|
|
71
|
-
public notifySuccess(title: string, content: string): void;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* 通过包名,获取某个App的版本名称
|
|
75
|
-
* @param packageName 包名
|
|
76
|
-
*/
|
|
77
|
-
public getAppVersionName(packageName: string): string;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* 通过包名,获取某个App版本号
|
|
81
|
-
* @param packageName 包名
|
|
82
|
-
*/
|
|
83
|
-
public getAppVersionCode(packageName: string): number;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* 通过包名,进入某个App设置界面
|
|
87
|
-
* @param packageName 包名
|
|
88
|
-
*/
|
|
89
|
-
public openAppSettings(packageName: string): void;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export { };
|
|
1
|
+
declare global {
|
|
2
|
+
var App: App;
|
|
3
|
+
|
|
4
|
+
interface App {
|
|
5
|
+
/**
|
|
6
|
+
* 获取当前包名
|
|
7
|
+
*/
|
|
8
|
+
public currentPackageName(): string;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 获取当前版本号
|
|
12
|
+
*/
|
|
13
|
+
public currentVersionCode(): number;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 获取当前版本名称
|
|
17
|
+
*/
|
|
18
|
+
public currentVersionName(): string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 获取包信息
|
|
22
|
+
*/
|
|
23
|
+
public packageInfo(): any;//这里是返回的PackageInfo(Android对象)
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 创建一个Intent对象
|
|
27
|
+
* @param i Intent对象
|
|
28
|
+
*/
|
|
29
|
+
public intent(i: Intent): Intent;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 调整到某个Activity
|
|
33
|
+
* @param uri 跳转的uri
|
|
34
|
+
*/
|
|
35
|
+
public gotoIntent(uri: string): void;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* 启动Activity
|
|
39
|
+
* @param intent Intent对象
|
|
40
|
+
*/
|
|
41
|
+
public startActivity(intent: Intent): void;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 返回到App
|
|
45
|
+
*/
|
|
46
|
+
public backApp(): void;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 启动服务
|
|
50
|
+
* @param service Intent对象
|
|
51
|
+
*/
|
|
52
|
+
public startService(service: Intent): any;//这里的参数和返回都是ComponentName(Android对象)
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* 发送广播
|
|
56
|
+
* @param intent Intent对象
|
|
57
|
+
*/
|
|
58
|
+
public sendBroadcast(intent: Intent): void;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* 通过包名,打开某个App
|
|
62
|
+
* @param packageName 包名
|
|
63
|
+
*/
|
|
64
|
+
public launch(packageName: string): void;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* 通知
|
|
68
|
+
* @param title 标题
|
|
69
|
+
* @param content 内容
|
|
70
|
+
*/
|
|
71
|
+
public notifySuccess(title: string, content: string): void;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 通过包名,获取某个App的版本名称
|
|
75
|
+
* @param packageName 包名
|
|
76
|
+
*/
|
|
77
|
+
public getAppVersionName(packageName: string): string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* 通过包名,获取某个App版本号
|
|
81
|
+
* @param packageName 包名
|
|
82
|
+
*/
|
|
83
|
+
public getAppVersionCode(packageName: string): number;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* 通过包名,进入某个App设置界面
|
|
87
|
+
* @param packageName 包名
|
|
88
|
+
*/
|
|
89
|
+
public openAppSettings(packageName: string): void;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export { };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
var DeekeScriptJson: DeekeScriptJson;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
interface DeekeScriptJson {
|
|
6
|
-
public setDeekeScriptJsonGroup(str:string): void;
|
|
7
|
-
|
|
8
|
-
public setSettingLists(str:string): void;
|
|
9
|
-
|
|
10
|
-
public toJson(): object;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { }
|
|
1
|
+
declare global {
|
|
2
|
+
var DeekeScriptJson: DeekeScriptJson;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
interface DeekeScriptJson {
|
|
6
|
+
public setDeekeScriptJsonGroup(str:string): void;
|
|
7
|
+
|
|
8
|
+
public setSettingLists(str:string): void;
|
|
9
|
+
|
|
10
|
+
public toJson(): object;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { }
|
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
|
|
2
|
-
declare global {
|
|
3
|
-
var Storage: storage;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
interface storage {
|
|
7
|
-
/**
|
|
8
|
-
* 创建存储实例 全局使用一个即可
|
|
9
|
-
* @param db 数据库名称
|
|
10
|
-
* @return 返回当前实例,如果已存在则直接返回
|
|
11
|
-
*/
|
|
12
|
-
public create(db: string): storage;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* 设置字符串
|
|
16
|
-
* @param key 键
|
|
17
|
-
* @param value 值
|
|
18
|
-
*/
|
|
19
|
-
public put(key: string, value: string): boolean;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 设置整型值
|
|
23
|
-
* @param key 键
|
|
24
|
-
* @param value 值
|
|
25
|
-
*/
|
|
26
|
-
public putInteger(key: string, value: number): boolean;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* 设置bool
|
|
30
|
-
* @param key 键
|
|
31
|
-
* @param value 值
|
|
32
|
-
*/
|
|
33
|
-
public putBoolean(key: string, value: boolean): boolean;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* 设置双精度值
|
|
37
|
-
* @param key 键
|
|
38
|
-
* @param value 值
|
|
39
|
-
*/
|
|
40
|
-
public putDouble(key: string, value: number): boolean;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* 设置对象
|
|
44
|
-
* @param key 键
|
|
45
|
-
* @param obj 值
|
|
46
|
-
*/
|
|
47
|
-
public putObj(key: string, obj: object): boolean;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* 设置集合(字符串)
|
|
51
|
-
* @param key 键
|
|
52
|
-
* @param set 值
|
|
53
|
-
*/
|
|
54
|
-
public putArray(key: string, arr: Array): boolean;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* 获取集合(字符串)
|
|
58
|
-
* @param key 键
|
|
59
|
-
*/
|
|
60
|
-
public getArray(key: string): Array;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* 获取字符串
|
|
64
|
-
* @param key 键
|
|
65
|
-
*/
|
|
66
|
-
public get(key: string): string;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* 获取字符串
|
|
70
|
-
* @param key 键
|
|
71
|
-
*/
|
|
72
|
-
public getString(key: string): string;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* 获取bool类型的值
|
|
76
|
-
* @param key 键
|
|
77
|
-
*/
|
|
78
|
-
public getBoolean(key: string): boolean;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* 获取Double类型的值
|
|
82
|
-
* @param key 键
|
|
83
|
-
*/
|
|
84
|
-
public getDouble(key: string): number;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* 获取整型类型的值
|
|
88
|
-
* @param key 键
|
|
89
|
-
*/
|
|
90
|
-
public getInteger(key: string): number;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* 获取对象类型的值
|
|
94
|
-
* @param key 键
|
|
95
|
-
*/
|
|
96
|
-
public getObj(key: string): object;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* 移除某个键
|
|
100
|
-
* @param key 键
|
|
101
|
-
*/
|
|
102
|
-
public remove(key: string): boolean;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* 清空所有值
|
|
106
|
-
*/
|
|
107
|
-
public clear(): boolean;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export { };
|
|
1
|
+
|
|
2
|
+
declare global {
|
|
3
|
+
var Storage: storage;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
interface storage {
|
|
7
|
+
/**
|
|
8
|
+
* 创建存储实例 全局使用一个即可
|
|
9
|
+
* @param db 数据库名称
|
|
10
|
+
* @return 返回当前实例,如果已存在则直接返回
|
|
11
|
+
*/
|
|
12
|
+
public create(db: string): storage;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 设置字符串
|
|
16
|
+
* @param key 键
|
|
17
|
+
* @param value 值
|
|
18
|
+
*/
|
|
19
|
+
public put(key: string, value: string): boolean;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 设置整型值
|
|
23
|
+
* @param key 键
|
|
24
|
+
* @param value 值
|
|
25
|
+
*/
|
|
26
|
+
public putInteger(key: string, value: number): boolean;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 设置bool
|
|
30
|
+
* @param key 键
|
|
31
|
+
* @param value 值
|
|
32
|
+
*/
|
|
33
|
+
public putBoolean(key: string, value: boolean): boolean;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 设置双精度值
|
|
37
|
+
* @param key 键
|
|
38
|
+
* @param value 值
|
|
39
|
+
*/
|
|
40
|
+
public putDouble(key: string, value: number): boolean;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 设置对象
|
|
44
|
+
* @param key 键
|
|
45
|
+
* @param obj 值
|
|
46
|
+
*/
|
|
47
|
+
public putObj(key: string, obj: object): boolean;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 设置集合(字符串)
|
|
51
|
+
* @param key 键
|
|
52
|
+
* @param set 值
|
|
53
|
+
*/
|
|
54
|
+
public putArray(key: string, arr: Array): boolean;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 获取集合(字符串)
|
|
58
|
+
* @param key 键
|
|
59
|
+
*/
|
|
60
|
+
public getArray(key: string): Array;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* 获取字符串
|
|
64
|
+
* @param key 键
|
|
65
|
+
*/
|
|
66
|
+
public get(key: string): string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* 获取字符串
|
|
70
|
+
* @param key 键
|
|
71
|
+
*/
|
|
72
|
+
public getString(key: string): string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* 获取bool类型的值
|
|
76
|
+
* @param key 键
|
|
77
|
+
*/
|
|
78
|
+
public getBoolean(key: string): boolean;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* 获取Double类型的值
|
|
82
|
+
* @param key 键
|
|
83
|
+
*/
|
|
84
|
+
public getDouble(key: string): number;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* 获取整型类型的值
|
|
88
|
+
* @param key 键
|
|
89
|
+
*/
|
|
90
|
+
public getInteger(key: string): number;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* 获取对象类型的值
|
|
94
|
+
* @param key 键
|
|
95
|
+
*/
|
|
96
|
+
public getObj(key: string): object;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* 移除某个键
|
|
100
|
+
* @param key 键
|
|
101
|
+
*/
|
|
102
|
+
public remove(key: string): boolean;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* 清空所有值
|
|
106
|
+
*/
|
|
107
|
+
public clear(): boolean;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export { };
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deeke-script-app",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.7",
|
|
4
4
|
"description": "DeekeScript应用",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"build": "cpx \"src/**/*\" script",
|
|
8
|
-
"build-zip": "cpx \"src/**/*\" script && ts-node --esm ./deekeScriptZipBuild",
|
|
9
|
-
"build-obfuscator": "cpx \"src/**/*\" script && ts-node --esm ./gulpfile",
|
|
10
|
-
"build-obfuscator-zip": "cpx \"src/**/*\" script && ts-node --esm ./gulpfile && ts-node --esm ./deekeScriptZipBuild",
|
|
7
|
+
"build": "rimraf script && cpx \"src/**/*\" script",
|
|
8
|
+
"build-zip": "rimraf script && cpx \"src/**/*\" script && ts-node --esm ./deekeScriptZipBuild",
|
|
9
|
+
"build-obfuscator": "rimraf script && cpx \"src/**/*\" script && ts-node --esm ./gulpfile",
|
|
10
|
+
"build-obfuscator-zip": "rimraf script && cpx \"src/**/*\" script && ts-node --esm ./gulpfile && ts-node --esm ./deekeScriptZipBuild",
|
|
11
11
|
"postinstall": "ts-node --esm init"
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"glob": "^11.0.0",
|
|
31
31
|
"gulp": "^5.0.0",
|
|
32
32
|
"gulp-uglify": "^3.0.2",
|
|
33
|
+
"rimraf": "^6.1.0",
|
|
33
34
|
"ts-loader": "^9.5.1",
|
|
34
35
|
"typescript": "^5.8.2"
|
|
35
36
|
},
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
let e = {
|
|
2
|
-
log() {
|
|
3
|
-
Log.log(arguments), console.log(arguments);
|
|
4
|
-
},
|
|
5
|
-
comment() {
|
|
6
|
-
var e = UiSelector().id("com.ss.android.ugc.aweme:id/comment_container").isVisibleToUser(!0).findOne(), e = (console.log(e),
|
|
7
|
-
Gesture.click(e.bounds().left + Math.random() * e.bounds().width(), e.bounds().centerY()),
|
|
8
|
-
console.log("打开评论窗口"), System.sleep(1200), UiSelector().className("android.widget.EditText").editable(!0).findOne()), e = (console.log(e),
|
|
9
|
-
Gesture.click(e.bounds().left + Math.random() * e.bounds().width(), e.bounds().centerY()),
|
|
10
|
-
console.log("开始输入评论"), System.sleep(500), UiSelector().className("android.widget.EditText").editable(!0).findOne()), e = (console.log(e),
|
|
11
|
-
Log.log(e), e.setText("太棒了"), System.sleep(500), UiSelector().id("com.ss.android.ugc.aweme:id/dqq").text("发送").findOne());
|
|
12
|
-
console.log(e), Gesture.click(e.bounds().centerX(), e.bounds().centerY()),
|
|
13
|
-
System.sleep(500), Gesture.back(), System.sleep(500);
|
|
14
|
-
},
|
|
15
|
-
backHome() {
|
|
16
|
-
var e;
|
|
17
|
-
console.log("开始返回主页");
|
|
18
|
-
let o = 5;
|
|
19
|
-
for (;(e = UiSelector().id("com.ss.android.ugc.aweme:id/x_t").isVisibleToUser(!0).findOne()) && console.log("在首页"),
|
|
20
|
-
Gesture.back(), console.log("返回"), System.sleep(1e3), !e && 0 <= --o; );
|
|
21
|
-
},
|
|
22
|
-
run() {
|
|
23
|
-
console.log("开始进入应用"), App.launch("com.ss.android.ugc.aweme"), System.sleep(2e3);
|
|
24
|
-
let e = Storage.getInteger("task_douyin_zan_count"), o = Storage.getInteger("task_douyin_zan_comment");
|
|
25
|
-
for (console.log("配置:" + e + " 赞," + o + " 评论"); 0 < e || 0 < o; ) try {
|
|
26
|
-
var s;
|
|
27
|
-
console.log("zanCount: " + e + " commentCount: " + o), 0 <= --e && (s = UiSelector().id("com.ss.android.ugc.aweme:id/fd9").isVisibleToUser(!0).findOne(),
|
|
28
|
-
console.log("点赞tag", s), Gesture.click(s.bounds().left + Math.random() * s.bounds().width(), s.bounds().centerY()),
|
|
29
|
-
System.sleep(1e3), console.log("点赞完成")), 0 <= --o && (this.comment(),
|
|
30
|
-
System.sleep(1e3)), UiSelector().id("com.ss.android.ugc.aweme:id/viewpager").desc("视频").scrollable(!0).findOne().scrollForward(),
|
|
31
|
-
System.sleep(3e3);
|
|
32
|
-
} catch (e) {
|
|
33
|
-
console.log(e), this.backHome();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
|
|
1
|
+
let e = {
|
|
2
|
+
log() {
|
|
3
|
+
Log.log(arguments), console.log(arguments);
|
|
4
|
+
},
|
|
5
|
+
comment() {
|
|
6
|
+
var e = UiSelector().id("com.ss.android.ugc.aweme:id/comment_container").isVisibleToUser(!0).findOne(), e = (console.log(e),
|
|
7
|
+
Gesture.click(e.bounds().left + Math.random() * e.bounds().width(), e.bounds().centerY()),
|
|
8
|
+
console.log("打开评论窗口"), System.sleep(1200), UiSelector().className("android.widget.EditText").editable(!0).findOne()), e = (console.log(e),
|
|
9
|
+
Gesture.click(e.bounds().left + Math.random() * e.bounds().width(), e.bounds().centerY()),
|
|
10
|
+
console.log("开始输入评论"), System.sleep(500), UiSelector().className("android.widget.EditText").editable(!0).findOne()), e = (console.log(e),
|
|
11
|
+
Log.log(e), e.setText("太棒了"), System.sleep(500), UiSelector().id("com.ss.android.ugc.aweme:id/dqq").text("发送").findOne());
|
|
12
|
+
console.log(e), Gesture.click(e.bounds().centerX(), e.bounds().centerY()),
|
|
13
|
+
System.sleep(500), Gesture.back(), System.sleep(500);
|
|
14
|
+
},
|
|
15
|
+
backHome() {
|
|
16
|
+
var e;
|
|
17
|
+
console.log("开始返回主页");
|
|
18
|
+
let o = 5;
|
|
19
|
+
for (;(e = UiSelector().id("com.ss.android.ugc.aweme:id/x_t").isVisibleToUser(!0).findOne()) && console.log("在首页"),
|
|
20
|
+
Gesture.back(), console.log("返回"), System.sleep(1e3), !e && 0 <= --o; );
|
|
21
|
+
},
|
|
22
|
+
run() {
|
|
23
|
+
console.log("开始进入应用"), App.launch("com.ss.android.ugc.aweme"), System.sleep(2e3);
|
|
24
|
+
let e = Storage.getInteger("task_douyin_zan_count"), o = Storage.getInteger("task_douyin_zan_comment");
|
|
25
|
+
for (console.log("配置:" + e + " 赞," + o + " 评论"); 0 < e || 0 < o; ) try {
|
|
26
|
+
var s;
|
|
27
|
+
console.log("zanCount: " + e + " commentCount: " + o), 0 <= --e && (s = UiSelector().id("com.ss.android.ugc.aweme:id/fd9").isVisibleToUser(!0).findOne(),
|
|
28
|
+
console.log("点赞tag", s), Gesture.click(s.bounds().left + Math.random() * s.bounds().width(), s.bounds().centerY()),
|
|
29
|
+
System.sleep(1e3), console.log("点赞完成")), 0 <= --o && (this.comment(),
|
|
30
|
+
System.sleep(1e3)), UiSelector().id("com.ss.android.ugc.aweme:id/viewpager").desc("视频").scrollable(!0).findOne().scrollForward(),
|
|
31
|
+
System.sleep(3e3);
|
|
32
|
+
} catch (e) {
|
|
33
|
+
console.log(e), this.backHome();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
38
|
Log.setFile("douyin_zan.js.log"), e.run(), FloatDialogs.show("抖音任务完成");
|
package/script/task/dy.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
let e = require("./dyApp"), o = UiSelector().id("name").findOne(), r = {
|
|
2
|
-
toker_view_video_keywords: Storage.get("toker_view_video_keywords"),
|
|
3
|
-
toker_view_video_second: Storage.getInteger("toker_view_video_second"),
|
|
4
|
-
toker_run_sex: Storage.getArray("toker_run_sex")
|
|
5
|
-
};
|
|
6
|
-
|
|
1
|
+
let e = require("./dyApp"), o = UiSelector().id("name").findOne(), r = {
|
|
2
|
+
toker_view_video_keywords: Storage.get("toker_view_video_keywords"),
|
|
3
|
+
toker_view_video_second: Storage.getInteger("toker_view_video_second"),
|
|
4
|
+
toker_run_sex: Storage.getArray("toker_run_sex")
|
|
5
|
+
};
|
|
6
|
+
|
|
7
7
|
console.log(r, e.getName()), FloatDialogs.show("提示", "请编写业务代码");
|
package/script/task/dyApp.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
let e = {
|
|
2
|
-
getName() {
|
|
3
|
-
return "appName";
|
|
4
|
-
}
|
|
5
|
-
};
|
|
6
|
-
|
|
1
|
+
let e = {
|
|
2
|
+
getName() {
|
|
3
|
+
return "appName";
|
|
4
|
+
}
|
|
5
|
+
};
|
|
6
|
+
|
|
7
7
|
module.exports = e;
|
package/script/task/tool.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
let a = {
|
|
2
|
-
intoApp() {},
|
|
3
|
-
backApp() {},
|
|
4
|
-
task() {},
|
|
5
|
-
run() {
|
|
6
|
-
FloatDialogs.show("提示", "请编写业务代码");
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
|
|
1
|
+
let a = {
|
|
2
|
+
intoApp() {},
|
|
3
|
+
backApp() {},
|
|
4
|
+
task() {},
|
|
5
|
+
run() {
|
|
6
|
+
FloatDialogs.show("提示", "请编写业务代码");
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
10
|
a.run();
|
package/script/9/common/util.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
let e = {
|
|
2
|
-
setLog(e) {
|
|
3
|
-
Log.setFile(e);
|
|
4
|
-
},
|
|
5
|
-
log() {
|
|
6
|
-
Log.log(arguments), console.log(arguments);
|
|
7
|
-
},
|
|
8
|
-
click(e) {
|
|
9
|
-
this.log("点击了控件:", e), Gesture.click(e.bounds().left + Math.random() * e.bounds().width(), e.bounds().top + Math.random() * e.bounds().height());
|
|
10
|
-
},
|
|
11
|
-
input(e, t) {
|
|
12
|
-
e.setText(t);
|
|
13
|
-
},
|
|
14
|
-
swipe() {
|
|
15
|
-
var e = Device.height() * (.6 + .2 * Math.random()), t = Device.height() * (.2 + .2 * Math.random()), o = Math.random() * Device.width() * .6 + .2 * Device.width();
|
|
16
|
-
Gesture.swipe(o, e, o + .1 * Device.width(), t, 200 + 100 * Math.random());
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
module.exports = e;
|