关注遍历取消

### 循环点取消关注 ``` while (true) { let 取消关注 = textMatches(/已关注/).visibleToUser(true).find() for (let i = 0; i < 取消关注.length; i++) { click(取消关注[i].bounds().centerX(), 取消关注[i].bounds().centerY()) sleep(2000) } 滑动视频() sleep(1000) } while (true) { let 取消关注 = textMatches(/已关注/).visibleToUser(true).find(); 取消关注.forEach(传递参数 => { if (传递参数.text() !== "") { let bounds = 传递参数.bounds(); click(bounds.centerX(), bounds.centerY()); sleep(2000); } }); 滑动视频(); sleep(1000); } for (let i = 0; i < 1; i++) { let 取消关注 = className("Button").find() 取消关注.forEach(传递参数 => { if (传递参数.text() == "已关注") { let bounds = 传递参数.bounds(); click(bounds.centerX(), bounds.centerY()); sleep(2000); } }) 滑动视频(); sleep(1000); } function 滑动视频() { let x = device.width; let y = device.height; swipe(x * 0.5, y * 0.8, x * 0.6, y * 0.2, 500); } ``` ## 循环倒计时 ``` 循环倒计时("开始", "30秒"); function 循环倒计时(声明, 时间) { for (声明 = 30; 声明 > 1; 声明--) { log("倒计时-> " + 时间 + "<-还剩余" + 声明) sleep(1000) } } ```