autojs----2025淘宝淘金币跳一跳自动化
有概率被淘宝检测脚本,导致奖励变少,本人一概不负责
使用流程
1.下载autojs,创建文件把脚本代码复制
2.打开淘宝,进入淘金币领体力界面

3.进入搜索任务,替换代码中的挡风披冬季,为任意你的物品即可,随后返回领体力界面

3.返回autojs,启动脚本,打开淘宝,此时在领体力任务界面
代码
"auto";auto.waitFor();var height = device.height;
var width = device.width;
setScreenMetrics(width, height);toast("开始执行淘宝浏览类任务...");
app.launchApp("淘宝");
sleep(5000);var maxTry = 1000;
var tryCount = 0;while (tryCount < maxTry) {tryCount++;var buttons = text("去完成").find();if (buttons.empty()) {toast("未找到‘去完成’,尝试滑动刷新...");swipe(width / 2, height * 0.8, width / 2, height * 0.3, 800);sleep(3000);continue;}var found = false;for (var i = 0; i < buttons.size(); i++) {var btn = buttons.get(i);var parent = btn.parent();var textAll = "";if (parent) {var textViews = parent.find(className("TextView"));var minDist = 10000;textViews.forEach(tv => {var dist = Math.abs(tv.bounds().centerY() - btn.bounds().centerY());if (dist < minDist) {minDist = dist;textAll = tv.text();}});}toast("检测到任务文本:" + textAll);if (textAll && textAll.match(/浏览.*秒/)) {found = true;toast("执行任务:" + textAll);// 点击“去完成”try {if (btn.clickable()) {btn.click();} else {click(btn.bounds().centerX(), btn.bounds().centerY());}} catch (e) {toast("点击异常,尝试坐标点击");click(btn.bounds().centerX(), btn.bounds().centerY());}sleep(4000); // 等待页面加载// 检测是否有“搜索”按钮var searchBtn = text("搜索").findOne(2000); // 等待2秒if (searchBtn) {toast("发现搜索按钮,先点击挡风披冬季");var itemBtn = text("挡风披冬季").findOne(2000);if (itemBtn) {itemBtn.click();sleep(1000);}toast("点击搜索按钮");searchBtn.click();sleep(2000);}// 模拟滑动浏览页面,改为滑动7次for (var j = 0; j < 7; j++) {swipe(width / 2, height * 0.8, width / 2, height * 0.2, 800);sleep(2000);}// 模拟浏览时间(15秒)sleep(7000);try {back();} catch (e) {toast("返回失败,重试");sleep(2000);back();}sleep(4000);break;}}if (!found) {toast("未找到浏览类任务,继续下滑刷新...");swipe(width / 2, height * 0.8, width / 2, height * 0.3, 800);sleep(3000);}
}toast("任务循环结束");