修复QQ空间点赞脚本
This commit is contained in:
@@ -1,49 +0,0 @@
|
|||||||
"auto";
|
|
||||||
|
|
||||||
var 延迟 = 0;
|
|
||||||
|
|
||||||
function 点赞(){
|
|
||||||
className("AbsListView").findOne()
|
|
||||||
.children().each(function(ss){
|
|
||||||
try{
|
|
||||||
var 一行 = 找到图标那一行(ss);
|
|
||||||
if(一行){
|
|
||||||
一行.child(1).click();
|
|
||||||
if(延迟 > 0){
|
|
||||||
sleep(延迟);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}catch(e){}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function 找到图标那一行(s){
|
|
||||||
for(let i = 0; i < s.getChildCount(); i++){
|
|
||||||
var child = s.child(i);
|
|
||||||
if(child && child.className()
|
|
||||||
.endsWith("RelativeLayout") &&
|
|
||||||
child.getChildCount() >= 4){
|
|
||||||
if(是图片(child.child(1)) &&
|
|
||||||
是图片(child.child(2)) &&
|
|
||||||
是图片(child.child(3))){
|
|
||||||
return child;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function 是图片(item){
|
|
||||||
return item &&
|
|
||||||
item.className().endsWith("ImageView");
|
|
||||||
}
|
|
||||||
|
|
||||||
function 下滑(){
|
|
||||||
className("AbsListView").findOne()
|
|
||||||
.scrollForward();
|
|
||||||
}
|
|
||||||
|
|
||||||
while(true){
|
|
||||||
点赞();
|
|
||||||
下滑();
|
|
||||||
}
|
|
||||||
71
app/src/main/assets/sample/QQ与微信/QQ空间点赞.js
Normal file
71
app/src/main/assets/sample/QQ与微信/QQ空间点赞.js
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
"auto";
|
||||||
|
|
||||||
|
var 延迟 = 0;
|
||||||
|
|
||||||
|
if(!requestScreenCapture()){
|
||||||
|
toast("请求截图失败");
|
||||||
|
stop();
|
||||||
|
}
|
||||||
|
|
||||||
|
var capture;
|
||||||
|
|
||||||
|
function like(){
|
||||||
|
capture = captureScreen();
|
||||||
|
className("AbsListView").findOne()
|
||||||
|
.children().each(function(ss){
|
||||||
|
try{
|
||||||
|
var iconLine = findIconLine(ss);
|
||||||
|
if(iconLine){
|
||||||
|
var likeIcon = iconLine.child(1).child(0);
|
||||||
|
if(notLiked(likeIcon)){
|
||||||
|
likeIcon.click();
|
||||||
|
}
|
||||||
|
if(延迟 > 0){
|
||||||
|
sleep(延迟);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}catch(e){
|
||||||
|
log(e)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function findIconLine(s){
|
||||||
|
for(let i = 0; i < s.getChildCount(); i++){
|
||||||
|
var child = s.child(i);
|
||||||
|
if(child && child.className()
|
||||||
|
.endsWith("RelativeLayout") &&
|
||||||
|
child.getChildCount() >= 4){
|
||||||
|
if(isImage(child.child(1)) &&
|
||||||
|
isImage(child.child(2)) &&
|
||||||
|
isImage(child.child(3))){
|
||||||
|
return child;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function isImage(item){
|
||||||
|
if(!item){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(item.className().endsWith("ImageView")){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(item.childCount() == 1){
|
||||||
|
return isImage(item.child(0));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function notLiked(likeIcon){
|
||||||
|
var x = likeIcon.bounds().centerX();
|
||||||
|
var y = likeIcon.bounds().centerY();
|
||||||
|
return images.detectsColor(capture, x, y, 0x767886);
|
||||||
|
}
|
||||||
|
|
||||||
|
toast("请打开QQ空间并慢慢下滑");
|
||||||
|
while(true){
|
||||||
|
like();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user