|
|
|
@ -0,0 +1,33 @@
|
|
|
|
|
// 初始化点赞速度,默认1秒
|
|
|
|
|
let likeSpeed = 1000;
|
|
|
|
|
|
|
|
|
|
// 创建悬浮窗口
|
|
|
|
|
let window = floaty.window(
|
|
|
|
|
<vertical bg="#AA000000" padding="10dp" radius="10dp">
|
|
|
|
|
<text text="点赞速度控制" textSize="20sp" textColor="#FFFFFF" gravity="center" />
|
|
|
|
|
<seekbar id="speedBar" max="5000" progress="1000" />
|
|
|
|
|
<text id="speedText" text="间隔:1000毫秒" textColor="#FFFFFF" gravity="center" />
|
|
|
|
|
</vertical>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// 设置悬浮窗位置为屏幕中央
|
|
|
|
|
window.setPosition(300, 1200); // 调整位置,使窗口在中央
|
|
|
|
|
|
|
|
|
|
window.speedBar.setOnSeekBarChangeListener({
|
|
|
|
|
onProgressChanged: function (seekBar, progress, fromUser) {
|
|
|
|
|
likeSpeed = progress; // 将进度值直接用于点赞速度
|
|
|
|
|
window.speedText.setText("速度:" + likeSpeed + "毫秒");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function autoLike() {
|
|
|
|
|
while (true) {
|
|
|
|
|
click(600 / 2, 2000 / 2); // 双击屏幕中间点赞
|
|
|
|
|
sleep(100);
|
|
|
|
|
click(600 / 2, 2000 / 2);
|
|
|
|
|
sleep(likeSpeed); // 根据滑动条设置的速度控制点赞间隔
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 启动自动点赞功能
|
|
|
|
|
autoLike();
|