-
Notifications
You must be signed in to change notification settings - Fork 0
/
修改.js
109 lines (93 loc) · 2.38 KB
/
修改.js
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
//读取page1路径
const path0 = files.getSdcardPath() + "/Android/data/com.up366.mobile/files/flipbook/";
const path6 = files.getSdcardPath() + "/Android/data/com.up366.answer/cache/";
var finalPath = files.read(path6 + "/page.txt")
var zyPath = files.read(path6 + "/作业文件夹.txt")
var Path1 = files.read(path6 + "/作业文件夹.txt")
//删除作业
files.removeDir(finalPath);
files.removeDir(zyPath);
toast("请选择要修改的作业");
//打开
launchApp("天学网学生");
//切后台
var G = true;
var window = floaty.window(
<frame>
<button id="action" text="加载进度条出现时点我!" w="250" h="40" bg="#FFA10028"/>
</frame>
);
//手动
window.action.click(() => {
toast("请耐心等待");
G = false
window.close();
});
//长按调整位置
window.action.longClick(() => {
window.setAdjustEnabled(!window.isAdjustEnabled());
return true;
});
setInterval(() => {}, 1000);
//自动
while (G) {
if (files.exists(Path1 + ".tem") || G == false) {
G = false;
toast("正在切换到后台...");
launch("com.up366.answer");
sleep("100");
}
}
//检测
var Q = true;
var window = floaty.window(
<frame>
<button id="action" text="请用意念判断天学网听力是否加载完成!再点我!跳过等待" w="250" h="100" bg="#FFA10028"/>
</frame>
);
/*
//手动
window.action.click(() => {
Q = false;
window.close();
});
*/
//长按调整位置
window.action.longClick(() => {
window.setAdjustEnabled(!window.isAdjustEnabled());
//return true;
});
setInterval(() => {}, 1000);
//自动
var d = dialogs.build({
title: "请耐心等待,加载中...",
progress: {
max: -1
},
cancelable: true
}).show();
while (Q) {
if (files.exists(finalPath) == true || Q == false) {
a = 1;
toast("准备完毕");
setTimeout(() => {
d.dismiss();
}, 1);
} else {
toast("加载中...");
sleep("2000");
}
}
//操作
var i = dialogs.multiChoice("接下来的操作", ["更换音频MP3(旁白)", "更改分数JS(速通)"]);
if (i.toString() == [0, 1].toString()) {
//更换全部
engines.execScriptFile("更换.js");
engines.execScriptFile("速通.js");
} else if (i == 0) {
//更换旁白
engines.execScriptFile("更换.js");
} else if (i == 1) {
//速通
engines.execScriptFile("速通.js");
}