加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
HModules.js 6.88 KB
一键复制 编辑 原始数据 按行查看 历史
TheHot 提交于 2018-11-11 19:31 . 修复多开分身卡界面
//多功能API-V1.0
//使用前请仔细查看以下参数
//From.TheHot.2018.10.25
//新闻阅读类下滑函数
function yuedu(count) {
let count = count;
for (i = 0; i <= count; i++) {
sleep(20);
swipe(device.width / 2, device.height / 4.2 * 3, device.width / 2, device.height / 8, 200);
}
}
//多开分身养号操作
function duokaiyh(多开分身,X,Y) {
app.launchPackage("com.bly.dkplat");
sleep(4000);
var i = currentActivity();
toastLog(i);
switch (i) {
case "com.bly.dkplat.widget.MainActivity":
id("iv_btn_create").findOne().click();
break;
case "com.bly.dkplat.widget.manage.PluginConfigActivity":
back();
id("iv_btn_create").findOne().click();
break;
case "com.bly.dkplat.widget.create.SelectCreateAppActivity":
break;
default:
break;
}
sleep(1000);
click(X, Y);
var c = className("android.widget.TextView").text(多开分身).findOne().bounds();
var d = id("tv_btn").findOne().bounds();
sleep(200);
click(d.centerX(), c.centerY());
sleep(200);
id("tv_btn_advance").findOne().click();
sleep(500);
id("cb_virtual_sdcard").findOne().click();
sleep(200);
id("tv_btn_set_device").findOne().click();
sleep(200);
id("text1").findOne().parent().click();
sleep(200);
let xinghao = ["小米", "华为", "OPPO", "VIVO", "魅族", "索尼", "摩托罗拉", "三星", "努比亚", "谷歌", "一加", "金立", "美图", "酷派", "360"];
let suiji = xinghao[random(0, 14)];
className("android.widget.TextView").text(suiji).findOne().click();
sleep(200);
id("tv_apply").findOne().click();
sleep(200);
id("tv_create").findOne().click();
sleep(200);
waitForActivity("com.android.packageinstaller.PackageInstallerActivity");
id("ok_button").findOne().click();
id("launch_button").waitFor();
id("launch_button").findOne().click();
}
//多开分身清数据
function duokai(多开分身) {
sleep(1000);
app.launchPackage("com.bly.dkplat");
sleep(2000);
back();
sleep(200);
u = currentActivity();
if (u == "com.bly.dkplat.widget.manage.PluginConfigActivity") {
sleep(20);
} else {
id("iv_btn_create").findOne(6000);
let a = id("tv_btn_manage").text("管理").findOne().bounds()
var tv_nameSize = id("tv_name").find().size();
for (var i = 0; i < tv_nameSize; i++) {
if (id("tv_name").find().get(i).text() == 多开分身) {
break;
}
}
let b = id("iv_logo").find().get(i).bounds();
while (!click(a.centerX(), b.centerY()));
}
id("tv_btn_stop").findOne().click();
sleep(200);
id("tv_btn_clean").findOne().click();
className("android.widget.TextView").text("完成").waitFor();
sleep(200);
back();
id("tv_btn_set_device").findOne().click();
id("tv_recover").findOne().click();
back();
id("tv_btn_set_device").findOne().click();
id("text1").findOne().parent().click();
let xinghao = ["小米", "华为", "OPPO", "VIVO", "魅族", "索尼", "摩托罗拉", "三星", "努比亚", "谷歌", "一加", "金立", "美图", "酷派", "360"];
let suiji = xinghao[random(0, 14)];
className("android.widget.TextView").text(suiji).findOne().click();
sleep(200);
id("tv_apply").findOne().click();
toastLog("机型更换成功!");
id("iv_logo").findOne().click(); //打开应用
}
//独享无极换IP
function wuji() {
sleep(1000);
launchApp("无极");
sleep(200);
id("exit_vpn").findOne().click();
className("android.widget.Button").text("切换").waitFor();
toastLog("切换IP成功!");
}
//共享版无极
function wujivpn() {
sleep(1000);
app.launchPackage("org.wuji");
sleep(200);
id("btn_startvpn").findOne().click();
className("android.widget.Button").text("切换").waitFor();
toastLog("切换IP成功!");
}
//光子换IP
function gz() {
app.launchPackage("com.photon.hybrid");
sleep(200);
id("apv_switch").findOne().click();
sleep(4000);
toastLog("IP切换成功");
sleep(200);
}
//PPTP换IP
function pptp() {
var intent = new Intent("android.net.vpn.SETTINGS");
app.startActivity(intent);
sleep(200);
var a = className("android.widget.CheckBox").findOne().bounds();
if (className("android.widget.TextView").text("已连接").exists()) {
click(a.centerX(), a.centerY());
}
sleep(500);
click(a.centerX(), a.centerY());
className("android.widget.TextView").text("已连接").waitFor();
}
//姓名随机函数
function getRandomName() {
var firstNames = new Array("", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "", "欧阳", "慕容"
);
var secondNames = new Array("子璇", "淼子", "国栋", "夫子", "瑞堂", "", "", "", "国贤", "贺祥", "晨涛", "昊轩", "易轩", "益辰", "益帆", "益冉", "瑾春", "瑾昆", "春齐", "", "文昊", "东东", "雄霖", "浩晨", "熙涵", "溶溶", "冰枫", "欣欣", "宜豪", "欣慧", "建政", "美欣", "淑慧", "文轩", "文杰", "欣源", "忠林", "榕润", "欣汝", "慧嘉", "新建", "建林", "亦菲", "", "冰洁", "佳欣", "涵涵", "禹辰", "淳美", "泽惠", "伟洋", "涵越", "润丽", "", "淑华", "晶莹", "凌晶", "苒溪", "雨涵", "嘉怡", "佳毅", "子辰", "佳琪", "紫轩", "瑞辰", "昕蕊", "", "明远", "欣宜", "泽远", "欣怡", "佳怡", "佳惠", "晨茜", "晨璐", "运昊", "汝鑫", "淑君", "晶滢", "润莎", "榕汕", "佳钰", "佳玉", "晓庆", "一鸣", "语晨", "添池", "添昊", "雨泽", "雅晗", "雅涵", "清妍", "诗悦", "嘉乐", "晨涵", "天赫", "玥傲", "佳昊", "天昊", "萌萌", "若萌");
var thirdNames = new Array("1", "2", "3", "4", "5", "6", "7", "8", "9");
var firstLength = firstNames.length;
var secondLength = secondNames.length;
var thirdLength = thirdNames.length;
var i = parseInt(Math.random() * firstLength);
var j = parseInt(Math.random() * secondLength);
var k = parseInt(Math.random() * thirdLength);
var name = firstNames[i] + secondNames[j] + thirdNames[k] + thirdNames[random(0, 8)] + thirdNames[random(0, 8)];
return name;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化