var mint = 2; //最短时间
var maxt = 4; //最长时间
//连续刷新次数
var min_count = 30; //最小次数
var max_count = 40; //最大次数
//连续刷新结束后,延迟时间
var min_delay = 20; //最少延迟
var max_delay = 30; //最多延迟
auto();
var dizhi, coin, qd;
toast("开始运行");
threads.start(function() {
while (true) {
count = random(min_count, max_count);
while (count--) {
gestures([random(300, 600), [300, 800],
[300, 1400]
]);
sleep(random(mint, maxt));
}
sleep(random(min_delay, max_delay));
}
});
qiangdan();
function qiangdan() {
while (true) {
coin = null, qd = null;
while (!coin || !qd) {
dizhi = id("tv_first_line_has").findOne();
//log(dizhi.text())
coin = id("card_fouth_line").findOnce(0);
//log(a);
qd = id("tv_could_download").text("可抢单").findOnce(0);
//log(1)
//sleep(1000);
}
var dizhi_flag1 = dizhi.text().split('|')[0].indexOf("宝应县") != -1 //找到宝应县
if (dizhi_flag1) {
continue;
}
try {
while (!dizhi.clickable()) {
dizhi = dizhi.parent();
}
while (!coin.clickable()) {
coin = coin.parent();
}
while (!qd.clickable()) {
qd = qd.parent();
}
} catch (e) {
continue;
}
if (dizhi + "" == coin + "" && dizhi + "" == qd + "") {
qd.click();
if (id("txt_cut_name").findOne().text() == "买断单价") {
sleep(300);
id("txt_submit").findOne().click();
id("txt_action").findOne().click();
toastLog("已抢单");
} else {
toastLog("无法买断");
}
back();
//sleep(1000);
}
}
}
网友评论