抖音极速版邀请码: 896357244 看文章加关注点分享都不用...加下邀请码就好
快手极速版邀请码: 2rvxaem
火山极速版邀请码:279116054
今日头条极速版邀请码:1849623318
auto.waitFor();
app.launchApp('抖音极速版');
sleep(10000);
console.show(); //开启日志(悬浮窗权限)
douYinyoungWin();
douYinCloseFriendTip();
let ImageView = className("android.widget.ImageView").depth(3).find();
if (ImageView.length == 3) {
ImageView[0].click();
sleep(3000);
cashOut();
}
//home();//关闭当前程序
/**
* 提现注意延迟必有否则找不到控件
* 另外网速也是问题
* 还有设备也是问题
* 我没写大家子优化吧
*/
function cashOut() {
if (className("android.view.View").text("元").exists()) {
toastLog("现金收益");
let b = className("android.view.View").text("元").findOne().parent().bounds();
let clickResult = click(b.centerX(), b.centerY());
sleep(3000);
if (clickResult) {
if (className("android.view.View").text("去提现").exists()) {
let b = className("android.view.View").text("去提现").findOne().bounds();
let clickResult = click(b.centerX(), b.centerY());
sleep(3000);
if (clickResult) {
if (className("android.view.View").text("提现30.00元").exists()) {
toastLog("提现30");
let b = className("android.view.View").text("提现30.00元").findOnce().parent().bounds();
let clickResult =click(b.centerX(), b.centerY());
if(clickResult){
if (text("立即提现").exists()) {
toastLog("立即提现");
let clickResult =text("立即提现").findOnce().click();
toastLog(clickResult);
}
}
}
}
}
}
}
}
/**
*点击一下屏幕
*/
function clickScreen() {
var x = device.width - device.width * 0.2;
var y = device.height - device.height * 0.2;
toastLog("点击屏幕" x ":" y);
let clickResult = click(x, y);
toastLog(clickResult);
}
/**
* 关闭好友红包提示
*/
function douYinCloseFriendTip() {
if (id("bap").exists()) {
id("bap").findOnce().click();
}
}
/**
* 屏幕向下滑动并延迟8至12秒
*/
function slideScreenDown(startX, startY, endX, endY, pressTime, timesInterval) {
swipe(startX, startY, endX, endY, pressTime);
sleep(timesInterval);
}
/**如果弹出青少年窗口,点击 */
function douYinyoungWin() {
if (youngWin = text("我知道了").exists()) {
console.log("点击了我知道了(青少年窗口)");
youngWin.click();
};
}