【EasyClick】【IOSusb】将自动化启动失败原因,如授权过期显示在中控上方法
脚本停止后,中控上默认官方是不显示脚本过期的提示的将下方模板默认代码
function autoServiceStart(time) {
for (let i = 0; i < time; i++) {
if (isServiceOk()) {
return true;
}
let started = startEnv();
logd("第" + (i + 1) + "次启动服务结果: " + started + " " + getStartEnvMsg());
if (isServiceOk()) {
return true;
}
}
return isServiceOk();
}
修改为
function autoServiceStart(time) {
let err
for (let i = 0; i < time; i++) {
if (isServiceOk()) {
return true;
}
let started = startEnv();
err = getStartEnvMsg()
logd("第" + (i + 1) + "次启动服务结果: " + started + " " + err);
if (isServiceOk()) {
return true;
}
}
throw err
}
页:
[1]