qq自动聊天,,英文装逼版😒
_20180215234923.js
https://pan.baidu.com/s/1ggA6wPP
适当装逼,当心被骂😒😒

最后由 O了吗 编辑
//打开QQ聊天界面就能自动聊天了
"auto"
t = 0; //延迟
toast("打开QQ消息界面自动聊天");
threads.start(notificationmsg);
while (true) {
  other = "";
  findMessage();
  othersay = getMessage();
  if (othersay != null) {
    if (isChinese(othersay)) {
      var info = othersay;
    } else {
      info = translate(othersay);
    }
    log("\n\nTa:\n" + ":" + othersay);
    i = "";
    i += translate(Me());
    i += "";
    sendMessage(i);
    log("\n\n我:\n" + i);
    sleep(t)
  }
  findboxmsg();
}

function Me() {
  var url = "http://www.tuling123.com/openapi/api";
  id1 = "llmjk";
  var res = http.post(url, {
    key: "65458a5df537443b89b31f1c03202a80", //图灵
    //key: "e0fcda33be9847c8b8534abe51b4b095", //唐嫣
    // key: "b4438ca194064134afa28f686fbd04a5", //my图灵
    info: info,
    userid: "1",
  });
  var html = res.body.string();
  eval("b=" + html);
  return b.text;
}

function getMessage() {
  var information = null;
  if (id("listView1").exists() && id("chat_item_head_icon").exists() && id("chat_item_content_layout").exists()) {
    num = msgnum();
    icon = id("chat_item_head_icon").findOnce(num - 1);
    toastt = id("chat_item_content_layout").findOnce(num - 1);
    if (toastt != null && icon != null) {
      x = icon.bounds().centerX();
      y = icon.bounds().centerY();
      if (x < 500) {
        information = toastt.text();
        other = icon.text();
      }
    }
  }
  return information;
}

function sendMessage(i) {
  if (id("input").exists()) {
    id("input").setText(i);
    className("android.widget.Button").text("发送").click();
  }
}

function findMessage() {
  if (id("unreadmsg").exists()) {
    unreadmsg = id("unreadmsg").findOnce(0);
    x1 = unreadmsg.bounds().centerX();
    y1 = unreadmsg.bounds().centerY();
    //click(x1 - 200, y1 - 50);
    press(x1 - 200, y1 - 50, 50);
    if (id("input").findOne(2000) == null) {
      back();
      if (currentActivity() != "com.tencent.mobileqq.activity.SplashActivity") {
        app.launch("com.tencent.mobileqq");
      }
    }
  } else {
    ismsg = className("android.widget.RelativeLayout").depth("4").drawingOrder("2").clickable(true).selected(true).findOne(100);
    if (ismsg != null && ismsg.childCount() == 3) {
      ismsg.click();
    }
  }
}

function findboxmsg() {
  if (id("msgbox").exists()) {
    id("msgbox").findOne(500).click();
  }
}

function notificationmsg() {
  var notifi;
  events.observeNotification();
  events.on("notification", function(n) {
    if ("com.tencent.mobileqq" == n.getPackageName()) {
      app.launch("com.tencent.mobileqq");
    }
  });
}

function msgnum() {
  i = 0;
  id("listView1").findOne().children().forEach(function(child) {
    if (child != null && child.className() == "android.widget.RelativeLayout")
      i++;
  });
  return i;
}

function getcenter(a, b, c) {
  a1 = a.split(b);
  b1 = [];
  for (i in a1)
    b1[i] = a1[i].split(c);
  //log(b1);
  c1 = [];
  for (var i = 0; i < b1.length; i++) {
    c1[i - 1] = b1[i][0];
  }
  return c1;
}

function clipIsChange() {
  a = getClip();
  sleep(30);
  b = getClip();
  return a != b;
}

function replaceHtml(str) {
  a = [/&#39;/g, /&amp;/g, /&lt;/g, /&gt;/g];
  b = ["'", "&", "<", ">"];
  for (var i = 0; i < a.length; i++) {
    str = str.replace(a[i], b[i]);
  }
  return str;
}

function isnull(str) {
  if (str.substr(0, 24) == "<input id=\"downIt\" type=" || str.substr(0, 64) == "<span id=\"tran_0_0\" onmouseover=\"hlgt(\'#src_0_0,#tran_0_0\')\" onm") {
    return true;
  } else {
    return false;
  }
}

function translate(str) {
  content = str;
  word = "";
  path = "http://www.youdao.com/w/" + content + "/#keyfrom=dict2.top";
  a = http.get(path).body.string();
  bs = '<span>\n                ';
  cs = '</span>';
  d = getcenter(a, bs, cs);
  word = d[0];
  if (word == null) {
    bl = '<p>';
    cl = '</p>\n';
    dl = getcenter(a, bl, cl);
    word = dl[1];
  }
  log(word);
  if (word == null || isnull(word)) {
    word = str + " ";
  }
  word = replaceHtml(word);
  return word;
}

function isChinese(str) {
  if (escape(str).indexOf("%u") < 0) {
    return false;
  } else {
    return true;
  }
}
最后由 O了吗 编辑

打开QQ自动聊天
qq自动聊天,,英文版_20180215234923.js
https://pan.baidu.com/s/1ggA6wPP

最后由 O了吗 编辑
此回复已被删除!
  • 4
    帖子
  • 525
    浏览

与 Auto.js 的连接断开,我们正在尝试重连,请耐心等待