auto.js书旗小说自动听书,两小时后自动领取奖励
"auto";
//是否显示提示消息
var g_showText = 0;
//时间
var look_time = 60 * 60000;
var log_num = 1;
var device_log = 1;
toast("test start");
var close_thread = threads.start(function () {
setInterval(() => {
try {
if (text("7天内不再提示").findOnce()) {
var a = text("7天内不再提示").findOnce().bounds();
click(a.centerX(), a.centerY())
}
if (text("以后再说").findOnce()) {
var a = text("以后再说").findOnce().bounds();
click(a.centerX(), a.centerY())
}
if (id("bottomCloseImg").findOnce()) {
toast('111111111')
var a = id("bottomCloseImg").findOnce().bounds();
click(a.centerX(), a.centerY())
}
if (text("延长时间").findOnce() && text("看视频获得听书时长").findOnce()) {
toast("立即观看")
var a = text("延长时间").findOnce().bounds();
click(a.centerX(), a.centerY());
sleep(5000)
}
if (text("立即观看").findOnce() && text("看视频获得听书时长").findOnce()) {
toast("立即观看")
var a = text("立即观看").findOnce().bounds();
click(a.centerX(), a.centerY());
sleep(45000)
click(1000, 180);
sleep(5000)
if (text("拒绝").findOnce()) {
var a = text("拒绝").findOnce().bounds();
click(a.centerX(), a.centerY());
sleep(5000);
click(1000, 180)
}
var packageName = currentPackage();
if (packageName != "com.shuqi.controller") {
launch('com.shuqi.controller');
sleep(15000);
back();
sleep(5000);
if (text("阅读电子书").findOnce()) {
var a = text("阅读电子书").findOnce().bounds();
click(a.centerX(), a.centerY());
sleep(5000);
}
}
if (text("继续观看").findOnce() && text("坚持退出").findOnce()) {
var a = text("继续观看").findOnce().bounds();
click(a.centerX(), a.centerY());
sleep(40000);
if (textContains("滑动浏览").findOnce()) {
for (var i = 0; i < 6; i++) {
swipe(560, 1300, 560, 400, 1000)
sleep(5000);
}
click(1000, 180)
sleep(8000);
if (text("阅读电子书").findOnce()) {
var a = text("阅读电子书").findOnce().bounds();
click(a.centerX(), a.centerY());
sleep(5000);
}
}
if (textContains("反馈").findOnce() && textContains("跳过").findOnce()) {
click(980, 1650)
sleep(50000);
if (text("拒绝").findOnce()) {
text("拒绝").findOnce().click();
sleep(3000)
click(980, 1480)
}
sleep(20000)
click(1000, 180);
sleep(5000);
if (text("查看原文").findOnce()) {
var a = text("查看原文").findOnce().bounds();
click(a.centerX(), a.centerY());
sleep(5000);
}
}
}
if (textContains("点击重播").findOnce()) {
back();
sleep(5000)
if (text("阅读电子书").findOnce()) {
var a = text("阅读电子书").findOnce().bounds();
click(a.centerX(), a.centerY());
sleep(5000);
}
}
if (text("拒绝").findOnce()) {
var a = text("拒绝").findOnce().bounds();
click(a.centerX(), a.centerY());
sleep(5000);
click(1000, 180)
}
if (text("残忍拒绝").findOnce()) {
var a = text("残忍拒绝").findOnce().bounds();
click(a.centerX(), a.centerY());
sleep(30000);
click(1000, 180);
sleep(500)
click(1000, 180)
sleep(10000);
if (text("查看原文").findOnce()) {
var a = text("查看原文").findOnce().bounds();
click(a.centerX(), a.centerY());
sleep(5000);
}
}
if (text("残忍离开").findOnce()) {
var a = text("残忍离开").findOnce().bounds();
click(a.centerX(), a.centerY());
sleep(30000);
click(1000, 180);
sleep(500)
click(1000, 180)
sleep(10000);
if (text("查看原文").findOnce()) {
var a = text("查看原文").findOnce().bounds();
click(a.centerX(), a.centerY());
sleep(5000);
}
}
sleep(5000)
}
if (text("查看原文").findOnce()) {
var a = text("查看原文").findOnce().bounds();
click(a.centerX(), a.centerY());
sleep(5000);
}
} catch (error) {
toast(error.message)
}
}, 1000);
})
clearMem()
sleep(random(0, 3 * 60000))
var succ = launch("com.shuqi.controller");
if (!succ) {
stop();
}
sleep(5000);
if (text("允许").findOnce()) {
text("允许").findOnce().click();
sleep(5000)
}
sleep(5000);
if (text("同意并继续").findOnce()) {
text("同意并继续").findOnce().click();
sleep(5000)
}
sleep(20000);
if (text("一键登录").findOnce()) {
var a = text("一键登录").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000);
if (text("同意并继续").findOnce()) {
var a = text("同意并继续").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000)
}
if (text("同意并登录").findOnce()) {
var a = text("同意并登录").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000)
}
sleep(8000)
}
if (text("跳过").findOnce()) {
text("跳过").findOnce().click();
sleep(10000)
}
if (text("跳过").findOnce()) {
text("跳过").findOnce().click();
sleep(10000)
}
if (text("跳过").findOnce()) {
text("跳过").findOnce().click();
sleep(10000)
}
if (id("bottomCloseImg").findOnce()) {
toast('111111111')
var a = id("bottomCloseImg").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000)
}
if (text("一键登录").findOnce()) {
var a = text("一键登录").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000);
if (text("同意并继续").findOnce()) {
var a = text("同意并继续").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000)
}
if (text("同意并登录").findOnce()) {
var a = text("同意并登录").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000)
}
sleep(8000)
}
if (text("跳过").findOnce()) {
text("跳过").findOnce().click();
sleep(10000)
}
if (text("跳过").findOnce()) {
text("跳过").findOnce().click();
sleep(10000)
}
if (text("我的").findOnce()) {
var a = text("我的").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000);
}
if (id("bottomCloseImg").findOnce()) {
toast('111111111')
var a = id("bottomCloseImg").findOnce().bounds();
click(a.centerX(), a.centerY());
sleep(8000);
}
if (id("bottomCloseImg").findOnce()) {
toast('111111111')
var a = id("bottomCloseImg").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000)
}
if (text("书城").findOnce()) {
var a = text("书城").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000);
}
if (id("bottomCloseImg").findOnce()) {
toast('111111111')
var a = id("bottomCloseImg").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000)
}
if (id("tpl_book_name").findOnce()) {
var a = id("tpl_book_name").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(10000);
if (!text("设置").findOnce()) {
click(560, 1950);
sleep(5000);
if (!text("设置").findOnce()) {
click(560, 1950);
sleep(5000);
}
}
if (!text("设置").findOnce()) {
click(560, 1950);
sleep(5000);
}
if (!text("设置").findOnce()) {
click(560, 1950);
sleep(5000);
}
if (text("设置").findOnce()) {
var a = text("设置").findOnce().bounds();
click(a.centerX(), a.centerY() - 400)
sleep(8000);
if (text("查看原文").findOnce()) {
var a = text("查看原文").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000);
}
}
}
sleep(look_time)
back();
sleep(2000)
back();
sleep(2000)
if (text("继续看看").findOnce()) {
var a = text("继续看看").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000);
}
if (textContains("下次再说").findOnce() && text("加入书架").findOnce()) {
var a = text("加入书架").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000);
}
back();
sleep(2000)
if (text("继续看看").findOnce()) {
var a = text("继续看看").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000);
}
thread2.interrupt()
JInbi();
JInbi();
function JInbi() {
try {
clearMem()
// sleep(random(0, 3 * 60000))
var succ = launch("com.shuqi.controller");
if (!succ) {
stop();
}
sleep(5000);
if (text("允许").findOnce()) {
text("允许").findOnce().click();
sleep(5000)
}
sleep(5000);
if (text("同意并继续").findOnce()) {
text("同意并继续").findOnce().click();
sleep(5000)
}
sleep(20000);
if (text("一键登录").findOnce()) {
var a = text("一键登录").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000);
if (text("同意并继续").findOnce()) {
var a = text("同意并继续").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000)
}
}
if (text("跳过").findOnce()) {
text("跳过").findOnce().click();
sleep(10000)
}
if (text("跳过").findOnce()) {
text("跳过").findOnce().click();
sleep(10000)
}
if (text("跳过").findOnce()) {
text("跳过").findOnce().click();
sleep(10000)
}
if (id("bottomCloseImg").findOnce()) {
toast('111111111')
var a = id("bottomCloseImg").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000)
}
if (text("福利").findOnce()) {
var a = text("福利").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000);
}
sleep(20000);
if (textContains("新人7日大礼包").findOnce() && text("立即打卡").findOnce()) {
var a = text("立即打卡").findOnce().bounds();
if (a.centerY() > 0 && a.centerY() < 1900) {
click(a.centerX(), a.centerY())
sleep(3000);
click(540, 1750);
sleep(5000);
}
}
for (var i = 0; i < 6; i++) {
for (var j = 0; j < 6; j++) {
if (text("领取奖励").findOnce()) {
var a = text("领取奖励").findOnce().bounds();
if (a.centerY() < 1500) {
click(a.centerX(), a.centerY())
sleep(8000);
}
}
}
if (text("去打卡").findOnce()) {
var a = text("去打卡").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(5000)
}
if (textContains("新人7日大礼包").findOnce() && text("立即打卡").findOnce()) {
var a = text("立即打卡").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000);
click(540, 1750);
sleep(5000)
}
if (text("去签到").findOnce()) {
var a = text("去签到").findOnce().bounds();
if (a.centerY() < 1900 && a.centerY > 0) {
click(a.centerX(), a.centerY())
sleep(5000)
}
}
if (text("换个任务").findOnce() && text("去做任务").findOnce()) {
click(540, 1580);
sleep(5000)
}
swipe(560, 1600, 560, 700, 1000)
sleep(1000);
}
if (text("换个任务").findOnce() && text("去做任务").findOnce()) {
click(540, 1580);
sleep(5000);
}
for (var i = 0; i < 6; i++) {
for (var j = 0; j < 6; j++) {
if (text("领取奖励").findOnce()) {
var a = text("领取奖励").findOnce().bounds();
if (a.centerY() < 1500) {
click(a.centerX(), a.centerY())
sleep(8000);
}
}
}
if (text("去打卡").findOnce()) {
var a = text("去打卡").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(5000)
}
if (textContains("新人7日大礼包").findOnce() && text("立即打卡").findOnce()) {
var a = text("立即打卡").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000);
click(540, 1750);
sleep(5000)
}
if (text("去签到").findOnce()) {
var a = text("去签到").findOnce().bounds();
if (a.centerY() < 1900 && a.centerY > 0) {
click(a.centerX(), a.centerY())
sleep(5000)
}
}
if (text("换个任务").findOnce() && text("去做任务").findOnce()) {
click(540, 1580);
sleep(5000)
}
swipe(560, 1600, 560, 700, 1000)
sleep(1000);
}
if (text("换个任务").findOnce() && text("去做任务").findOnce()) {
click(540, 1580);
sleep(5000);
}
if (text("去签到").findOnce()) {
var a = text("去签到").findOnce().bounds();
if (a.centerY() < 1900 && a.centerY > 0) {
click(a.centerX(), a.centerY())
sleep(5000)
}
}
for (var i = 0; i < 6; i++) {
swipe(560, 300, 560, 1700, 1000)
sleep(1000);
if (text("去签到").findOnce()) {
var a = text("去签到").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(5000)
}
if (text("立即签到").findOnce()) {
var a = text("立即签到").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(5000);
click(560, 1700)
sleep(2000)
}
if (text("换个任务").findOnce() && text("去做任务").findOnce()) {
click(540, 1580);
sleep(5000)
}
}
if (text("一键收取").findOnce()) {
var a = text("一键收取").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000);
}
if (text("换个任务").findOnce() && text("去做任务").findOnce()) {
click(540, 1580);
sleep(5000)
}
} catch (error) {
console.show();
log(error.message)
}
}
function close() {
if (text("关闭").findOnce()) {
var a = text("关闭").findOnce().bounds();
click(a.centerX(), a.centerY())
sleep(8000);
}
}
/**
* 点击home,清理内存
*/
function clearMem() {
sleep(1000);
//0 点击home按键
home()
sleep(2000);
dbgView('0 点击home按键');
//0-1 点击清理键,清理所有程序
recents()
sleep(2000);
//0-2 点击x
click(540, 1900);
sleep(2000);
//0-3 点击home按键
home()
sleep(2000);
dbgView('0 点击home按键');
//0-4 点击清理键,清理所有程序
recents()
sleep(2000);
//0-5 点击x
click(540, 1900);
sleep(2000);
}
function dbgView(viewText) {
if (g_showText == 1) {
toast(viewText);
}
}
脚本定制请私信了解