"auto"
;
function
click_Add(){
var
wait_num = 0;
while
(!textContains(
"发消息"
).exists()||!textContains(
"更多信息"
).exists()){
if
(wait_num > 6){
break
;
}
sleep(100);
wait_num++;
}
if
(textContains(
"发消息"
).exists()){
console.verbose(
"等待截屏..."
);
gestures([350, [300, 400], [300, 1400]],
[350, [600, 400], [600, 1400]],
[350, [900, 400], [900, 1400]]
);
}
}
var
count = 0;
while
(count<5){
id(
"c4v"
).findOne().children().forEach(
function
(child) {
console.info(
"child"
);
sleep(1000);
if
(child.findOne(className(
"android.widget.LinearLayout"
).depth(13))){
console.log(
"已点击"
);
var
bl = child.click();
console.info(
"click"
);
sleep(600);
click_Add();
if
(bl){
back();
}
}
});
sleep(100);
var
boolea = id(
"c4v"
).findOne().scrollForward();
if
(boolea ==
false
){
count++;
break
;
}
}
console.info(
"程序结束"
);