免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
返回列表 发帖

auto.js天猫自动领猫币

下载地址:https://www.lanzous.com/i6x2asj

1.
  1. auto.waitFor();
  2. var height = device.height;
  3. var width = device.width;
  4. toast("\n设备宽" + width + "\n" + "设备高" + height + "\n" + "手机型号" + device.model + "\n安卓版本" + device.release)
  5.  
  6.  
  7.  
  8. if (height == 1920) { //设置脚本坐标点击所适合的屏幕宽高。
  9.     setScreenMetrics(1080, 1920);
  10.     toast("设备高" + height);
  11.     lingqu()
  12. } else if (height == 2340) {
  13.     setScreenMetrics(1080, 2340);
  14.     toast("设备高" + height);
  15.     lingqu()
  16. }
  17. else if (height == 2160) {
  18.     setScreenMetrics(1080, 2160);
  19.     toast("设备高" + height);

  20. }

  21.     while (text("去进店").exists()) {
  22.         //要支持的动作
  23.         toast("存在去进店");
  24.         text("去进店").findOne().click();
  25.         sleep(2500);
  26.         swipe(width / 2, height - 600, width / 2, 0, 500);
  27.         sleep(3500);
  28.         swipe(width / 2, height - 600, width / 2, 0, 500);
  29.         sleep(10000);
  30.         swipe(width / 2, height - 600, width / 2, 0, 500);
  31.         sleep(9000);
  32.         back();
  33.         sleep(1000);
  34.     }
  35.     while (text("去浏览").exists()) {
  36.         //要支持的动作
  37.         toast("存在去浏览");
  38.         text("去浏览").findOne().click();
  39.         sleep(1500);
  40.         swipe(width / 2, height - 500, width / 2, 0, 500);
  41.         sleep(2500);
  42.         swipe(width / 2, height - 500, width / 2, 0, 500);
  43.         sleep(10000);
  44.         swipe(width / 2, height - 500, width / 2, 0, 500);
  45.         sleep(8000);
  46.         back();
  47.         sleep(1600);
  48.     }
  49.  
  50.     toast("结束");
复制代码
2.
  1. var str = "";
  2. str += "屏幕宽度:" + device.width
  3. str += "\n屏幕高度:" + device.height;
  4. toast("屏幕宽度为"+device.width+"   "+"屏幕高度为"+device.height);
  5. sleep(5000)

  6. for(var t=1;t<21;t++){ click(text("去进店").findOne().click())
  7. toast("点击去进店")
  8.     sleep(3000)
  9.    for(var i=0;i<6;i++){
  10.         
  11.     swipe(device.width / 2, 4*device.height/5, device.width / 2, device.height/5,1000);
  12.     sleep(3000)
  13.    
  14.     }
  15.     back()
  16.     toast("已经逛了"+t+"次")
  17.     sleep(3000)
  18.     }
复制代码

返回列表