let fds = id('com.ss.android.ugc.aweme:id/xg').findOnce();
if (fds) {
fds.click();
}
};
if (text('发现通讯录好友').exists()) {
let telList = text('暂时不要').findOnce();
if (telList) {
telList.click();
}
sleep(1000);
let no = text('取消').findOnce();
if (no) {
no.click();
}
};
if (text('个人信息保护指引').exists()) {
let ok = text('好的').findOnce();
if (ok) {
ok.click();
}
}
if (text('去商店评分').exists()) {
let comm = text('取消').findOnce();
if (comm) {
comm.click();
}
}
if (text('检测到更新').exists()) {
let o = text('以后再说').findOnce();
if (o) {
o.click();
}
}
if (text('我知道了').visibleToUser().exists()) {
let o = text('我知道了').visibleToUser().findOnce();
if (o) {
o.click();
}
}
if (text('安装“多闪APP”,不错过你的每一条私信').exists()) {
let ele = text('取消').findOnce();
if (ele) {
ele.click();
}
}
if (text('跳过广告').exists()) {
let ads = text('跳过广告').findOnce();
if (ads) {
ads.click();
}
}
}
});
}
/**
* 强制返回至抖音主页
*/
function dyhome() {
app.startActivity({
action: "android.intent.action.VIEW",
data: "snssdk1128://feed"
});
sleep(1000);
}
/**
* 返回一个随机表情
*/
function sj_bq() {
var str = "[微笑]|[惊呆]|[爱慕]|[流泪]|[可爱]|[害羞]|[呲牙]|[来看我]|[捂脸]|[耶]|[灵光一闪]|[偷笑]|[送心]|[大笑]|[泣不成声]|[可怜]|[奸笑]|[笑哭]|[黑线]|[坏笑]|[得意]|[翻白眼]|[互粉]|[吻]|[舔屏]|[飞吻]|[汗]|[擦汗]|[做鬼脸]|[尬笑]|[奋斗]|[惊喜]|[嘿哈]|[憨笑]|[囧]";
if (str) {
str = str.split("|");
var sjz = random(0, str.length - 1);
return str[sjz];
}
}
/**
* 控件上滑,滑动成功返回true否则返回false
*/
function swipeup() {
var uc = scrollable(true).visibleToUser(true).find();
if (uc.length > 0) {
if (uc[uc.length - 1].scrollForward()) {
return true;
} else {
return false;
}
}
}
/**
* 获取当前id的信息,获赞/关注/粉丝
* @return {Array} diggcount/followcount/fanscount
*/
function get_user_info() {
var res = {
diggcount: "",
followcount: "",
fanscount: ""
}
var info = textMatches("[0-9]+|[0-9].+w|[0-9].+亿").visibleToUser().filter(function (w) {