;

var 延迟 = 0;

if(!requestScreenCapture()){
toast("请求截图失败");
stop();
}

var capture;

function like(){
capture = captureScreen();
className("AbsListView").findOne()
.children().each(function(ss){
try{
var iconLine = findIconLine(ss);
if(iconLine){
var likeIcon = iconLine.child(1).child(0);
if(notLiked(likeIcon)){
likeIcon.click();
}
if(延迟 > 0){
sleep(延迟);
}
}
}catch(e){
log(e);
}
});
}

function findIconLine(s){
for(let i = 0; i < s.getChildCount(); i++){
var child = s.chil