"auto";
setScreenMetrics(768, 1366);
className("android.widget.TextView").text("赚钱了").findOne().click();
sleep(3000);
var e =text("我的").findOne().bounds();
click(e.centerX(),e.centerY());
sleep(3000);
e =text("发布管理").findOne().bounds();
click(e.centerX(),e.centerY());
sleep(3000);
//var nameArray = ["128816-10元(提交后秒审)","刷新"];
//for (i in nameArray) {
//var findResult=text(nameArray[i]).findOne().bounds();
// click(e.centerX(),e.centerY());
// toast(findResult.centerY());
// var result=nameArray[i];
// if(text(result).exists())
// {
// toast("yes");
// }
// el
//toast("no");
// }
id("recy_task_record").findOne().children().forEach(child => {
var title = child.findOne(id("tv_task_title")).text();
if(title.indexOf("10元")!=-1)
{
toast("检查包含了");
}
else{
toast("检查没包含了");
}
var applycount = child.findOne(id("tv_apply_count"));
var waitCheckCount=applycount.text().substr(3, title.length-3);
if(waitCheckCount>0)
{
var clickEPostion = applycount.bounds();
click(clickEPostion.centerX(),clickEPostion.centerY());
//无限制等待跳转到投诉界面
text('投诉').waitFor()
var checkTextViewTxt=id("tv_verify_text").findOne().text();
toast(checkTextViewTxt);
var checkId = checkTextViewTxt.substr(5, checkTextViewTxt.length-5);
//发送HTTP请求
}
});
// toast(result);
//};
/*window.action.setOnTouchListener(function(view, event){
switch(event.getAction()){
case event.ACTION_DOWN:
x = event.getRawX();
y = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
return true;
case event.ACTION_MOVE:
//移动手指时调整悬浮窗位置
window.setPosition(windowX + (event.getRawX() - x),
windowY + (event.getRawY() - y));
//如果按下的时间超过1.5秒判断为长按,退出脚本
if(new Date().getTime() - downTime > 1500){
exit();
}
return true;
case event.ACTION_UP:
//手指弹起时如果偏移很小则判断为点击
if(Math.abs(event.getRawY() - y) < 5 && Math.abs(event.getRawX() - x) < 5){
onClick();
}
return true;
}
return true;
});*/