[參考]AutoJS對QQ資料卡自動點贊指令碼
阿新 • • 發佈:2021-09-28
本指令碼可以在檢測到QQ視窗的條件下對點贊控制元件進行操作。
本指令碼可以在檢測到QQ視窗的條件下對點贊控制元件進行操作。
基本技術為模擬點選
需要安裝對應的AutoJS應用程式
var i = 1; do { if (className("android.widget.TextView").text("聯絡人").exists()) { toast("命中 - 聯絡人匹配成功"); if (className("android.widget.TextView").text("好友").exists()) { toast("命中 - 好友匹配成功"); className("android.widget.TextView").text("好友").findOne().parent().click(); do { if (id("rl").depth(12).className("android.widget.TextView").textEndsWith("聯絡人").exists()) { toast("命中 - 截止條件匹配成功"); break; } if (className("android.widget.LinearLayout").exists()) { var list = className("android.widget.LinearLayout").depth(11).untilFind(); toast("命中 - 好友框匹配成功"); /* for (var i = 0; i < list.length; i++) { //var bounds = list[i].bounds(); //console.log("檢查 - list[" + i + "] = " + list[i]); list[i].click(); for (var j = 0; j < 10; j++) { className("android.widget.FrameLayout").id("l0b").click(); } back(); //swipe(bounds.centerX(), bounds.Y(), bounds.centerX(), bounds.height()); sleep("2000"); } */ } toast("觸發滾動"); swipe(540, 1900, 540, 1000, 2000); } while (true) } break; } else { toast("等待切換到聯絡人頁面[" + i + "/30]"); sleep(5000); i++; } } while (i <= 30);