//微信1334295503
"ui";
storage = storages.create("界面配置");//初始化一个可以保存界面配置的文本 ,这里的文本名称为:界面配置
os = false;
ini()
轻甜ui()
function 轻甜ui() {
ui.layout(
<vertical bg="#B0E0E6" h="*" >;
<ScrollView>
<vertical id="轻甜设置" alpha="1" bg="#B0E0E6" layout_gravity="left" w="*" >
<text gravity="center" textColor="red" textSize="25sp" text="当前轻甜设置"></text>
<horizontal>
<checkbox id="轻甜_红包" text="红包" textSize="15sp" checked={相亲数据.get("轻甜_红包", true)} />;
<checkbox id="轻甜_接视频" text="自动接视频" textSize="15sp" checked={相亲数据.get("轻甜_接视频", false)} />;
</horizontal>
<horizontal>
<checkbox id="轻甜_新消息" text="新消息智能聊天" textSize="15sp" checked={相亲数据.get("轻甜_新消息", true) } />;
</horizontal>
<horizontal>
<text text="刷新等待最长时间" textStyle="bold" textSize="15" />
<input id="轻甜_刷新等待" hint="数字" textColor="#dd000000" >{相亲数据.get("轻甜_刷新等待", 30)}</input>;
<text text="秒" />
</horizontal>
<horizontal>
<text text="发送等待时间:" textStyle="bold" textSize="15" />
<input id="轻甜_发送等待" hint="数字" textColor="#dd000000" >{相亲数据.get("轻甜_发送等待", 3)}</input>;
<text text="秒" />
</horizontal>
<horizontal>
<text text="处理新消息时允许时长:" textStyle="bold" textSize="15" />
<input id="轻甜_消息空闲" hint="数字" textColor="#dd000000" >{相亲数据.get("轻甜_消息空闲", 200)}</input>;
<text text="秒" />
</horizontal>
<checkbox id="日志显示" text="日志显示" textSize="18sp" checked={相亲数据.get("日志显示", true) == false ? false : true} />;
<button id="返回键" text="返回" textSize="30sp" style="Widget.AppCompat.Button.Colored" w="*" />;
<button id="开始轻甜" text="开始轻甜" textSize="30sp" style="Widget.AppCompat.Button.Colored" w="*" />;
<button id="欢迎使用" text="欢迎使用" textSize="60sp" style="Widget.AppCompat.Button.Colored" w="*" />;
</vertical>
</ScrollView>
</vertical>
);
ui.返回键.on("click", () => {
back()
});
ui.开始轻甜.on("click", () => {
toastLog("启动中。点一次就可以哦")
if (相亲数据.get("自定关键词话术")) {
关键词话术 = 相亲数据.get("自定关键词话术").split("\r\n");
} else if (相亲数据.get("关键词话术")) {
关键词话术 = 相亲数据.get("关键词话术").split("\r\n");
}
if (相亲数据.get("自定通用话术")) {
通用话术 = 相亲数据.get("自定通用话术")
} else if (相亲数据.get("通用话术")) {
通用话术 = 相亲数据.get("通用话术")
}
if (相亲数据.get("自定主动话术")) {
主动话术 = 相亲数据.get("自定主动话术")
} else if (相亲数据.get("主动话术")) {
主动话术 = 相亲数据.get("主动话术")
}
当前app = "轻甜分身"
当前app版本 = "1.0.5"
相亲数据.put("轻甜_红包", ui.轻甜_红包.checked);
相亲数据.put("轻甜_接视频", ui.轻甜_接视频.checked);
相亲数据.put("轻甜_新消息", ui.轻甜_新消息.checked);
相亲数据.put("轻甜_刷新等待", ui.轻甜_刷新等待.text());
相亲数据.put("轻甜_发送等待", ui.轻甜_发送等待.text());
相亲数据.put("轻甜_消息空闲", ui.轻甜_消息空闲.text());
相亲数据.put("日志显示", ui.日志显示.checked);
// jihuomaCheck(cacheCode)
huidiao = true
setTimeout(function () {
if (huidiao == true) {
threads.start(function () {
home()
悬浮窗()
if (相亲数据.get("日志显示", true)) {
日志显示()
setInterval(() => {
window.setSize(device.width, device.height / 4)
window.setPosition(0, Math.round(1330 * h / 1920))
window.setTouchable(false);
}, 1000);
}
});
threads.start(function () {
开始轻甜();
});
}
}, 1000);
});
}
//下拉框保存界面配置
// function 存储数据2() {
// storage.put("sp2", ui.sp2.getSelectedItemPosition());//保存id为 sp1 的下拉框选项 到界面配置文本
// }
/*
如果读取下拉框sp1 在界面配置文本中不等于 undefined 则 设置下拉框sp1的选中项为 读取下拉框sp1保存的值
*/
function main(应用名称, 版本号) {
主线程 = threads.start(function () {
home()
// try {
while (true) {
log("xxxx")
启动应用(当前app, 当前app版本)
开始轻甜()
}
// } catch (error) {
// console.error("主线程,出现未知异常!")
// }
});
// 检测线程 = threads.start(function () {
// while (true) {
// // try {
// 前台检测(应用名称, 版本号)
// // } catch (error) {
// // console.error("前台检测线程,出现未知异常!")
// // }
// }
// });
}
function 开始轻甜() {
console.info("开始运行轻甜...");
console.info("请您手动打开轻甜平
由于平台会随时更新且会不断的调整策略,普通的Android原生开发语言,java、kotlin 就无法使用,故而只能采用能够随时、快速的更新的 Autojs ,实际上 autojs 是一款 github 开源的开发框架。优点就是可以加载执行 js 文件,通过 js 这类脚本语言,可以适应平台的更新节奏。目前支持2000+以上平台