今天分享一个完整的微博抢红包源码,是auto.js开发。当然也有微博协议抢红包的,效率更快更高。有技术的可以下载运行源码。
storage = storages.create("微博红包");
评论转发话术 = storage.get("评论转发话术", "");
清理X = storage.get("清理X", "");
清理Y = storage.get("清理Y", "");
一共有多少个分身 = storage.get("一共有多少个分身", "");
threads.start(function () {
while (true) {
var 评价 = text("给我们评分").findOne()
if (评价) {
toastLog("不评价")
text("不了,谢谢").findOne().click()
}
}
})
threads.start(function () {
while (true) {
var 以后再说 = text("以后再说").findOne()
if (以后再说) {
toastLog("不升级")
以后再说.click()
}
}
})
threads.start(function () {
while (true) {
text("去验证").findOne()
if (text("去验证").findOnce() && text("取消").findOnce()) {
var 去验证 = text("去验证").findOne(3000)
if (去验证) {
toastLog("去验证")
去验证.click()
}
}
}
})
ui.layout(
<frame>
<scroll>
<vertical>
<appbar>
<toolbar id="toolbar" textColor="black" title="微博红包" />
</appbar>
<vertical margin="15 5" >
<text textSize="18sp" textColor="#000000" text="请输入评论和转发用话术">
</text>
<text textSize="16sp" textColor="#ff0000" textStyle="bold" text="(每句话术用'|'隔开)">
</text>
<input id="评论转发话术" hint="请输入评论和转发用话术,每句话用'|'隔开">{评论转发话术}</input>
</vertical>
<vertical margin="15 5" >
<text textSize="18sp" textColor="#000000" text="请输入分身名称">
</text>
<text textSize="16sp" textColor="#ff0000" textStyle="bold" text="(每个分身用'|'隔开)">
</text>
<input id="一共有多少个分身" hint="请输入一共有多少个分身">{一共有多少个分身}</input>
</vertical>
<vertical margin="15 5" >
<text textSize="18sp" textColor="#000000" text="请输入清理键坐标">
</text>
<text textSize="16sp" textColor="#ff0000" textStyle="bold" text="(在执行前请确定auto.js以手动上锁)">
</text>
<horizontal>
<text textSize="18sp" textColor="#000000" text="X:">
</text>
<input id="清理X" inputType="number" hint="X坐标">{清理X}</input>
<text textSize="18sp" textColor="#000000" text="Y:">
</text>
<input id="清理Y" inputType="number" hint="Y坐标">{清理Y}</input>
</horizontal>
</vertical>
<vertical margin="15 50" >
<button id="start" text="开始" h="50" gravity="center" style="Widget.AppCompat.Button.Colored" />
</vertical>
</vertical>
</scroll>
</frame>
);
ui.start.click(function () {
saveConf();
if (ui.评论转发话术.text() != "") {
threads.start(function () {
auto.waitFor();
toastLog("开始执行")
main();
});
} else {
toastLog("输入内容有空,请检测全部输入后再运行")
}
});
function saveConf() {
storage.put("评论转发话术", ui.评论转发话术.text() + "");
storage.put("清理X", ui.清理X.text() + "");
storage.put("清理Y", ui.清理Y.text() + "");
storage.put("一共有多少个分身", ui.一共有多少个分身.text() + "");
};
function main() {
threads.start(function () {
while (true) {
text("等待").findOne().click()
toas