废话少说,直接代码,下面js脚本是基于冰狐智能辅助的,实现了自动阅读51cto文章,供大家参数。
import sys_xiaomi_runtime;
var sShouldExit = false;
function main() {
var hours = new Date().getHours();
console.log('hours:' + hours);
if (hours < 8 || hours > 23) {
return;
}
var ret = launchApp('com.cto51.student', 'txt:博客|txt:我的', {failed: exitPopup, maxStep: 30, beforeWait: 3000});
if (1 == ret) {
console.log('进入程序');
var __day checkIn = false;
if (!checkIn) {
ret = switchPage('txt:我的', 'txt:会员中心|txt:购物车|', {failed: exitPopup, click: true});
if (ret.length > 0) {
clickByTag('txt:签到', {click: true, afterWait: 2000});
checkIn = true;
}
}
ret = switchPage('txt:博客', 'txt:51CTO博客', {failed: exitPopup,