朋友圈的里面的动态更新太快,都没来得及看就被新的动态覆盖了,如果不给点赞可能很多朋友会以为我不关注他们呢,所以突发奇想,想要用按键精灵来做一个微信朋友圈自动点赞的工具.
于是利用之前学习到的按键精灵和MQ语言的知识轻轻松松就开发出来了哈哈!
这个脚本现在只能适应在小米5 分辨率的手机上,因为我的安卓手机是小米5,如果要适应其他手机,其实只需要更改一下识别的坐标就可以了.
上脚本代码吧!
小米5版本:
Dim screenX,screenY,deviceID,colorDep,shijian
screenX = GetScreenX()
screenY = GetScreenY()
colorDep = GetScreenColorDep()
deviceID = GetDeviceID()
Dim dTime=1000
Dim dlTime=2000
Dim cTime=500
Sub 信息提示(内容)
TracePrint 内容
ShowMessage 内容
Delay dTime
End Sub
Sub 单击(x, y,含义)
Touch x, y, cTime
TracePrint 含义
Delay dTime
End Sub
Sub 单击T(x,y,t,含义)
Touch x,y,t
TracePrint 含义
Delay dTime
End Sub
Call 信息提示("启动微信~")
RunApp "com.tencent.mm"
Delay dlTime
Call 单击(342, 1467, "单击第一个微信")
Call 单击(672, 1830, "单击发现")
Call 单击(350, 330, "单击朋友圈")
While True
Dim intX,intY
FindMultiColor 978,589,1045,1248,"B09385","-13|-2|F8F8F8,10|-1|F8F8F8,-32|-1|B09385,
19|0|B09385,-4|12|B09385,-5|-15|B09385,-21|-15|B09385,-24|17|B09385,17|-18|B09385",
0,0.9,intX,intY
If intX > -1 And intY > -1 Then
Call 单击(intX, intY, "单击")
FindMultiColor 532,437,572,1287,"FFFFFF","7|17|F4F3F3,14|20|3D3B34,
0|22|3D3B34,17|-2|FFFFFF,24|16|3D3B34,-9|15|FFFFFF,19|29|FFFFFF,9|31|3D3B34,
9|-1|615F59",0,0.9,intX,intY
If intX > -1 And intY > -1 Then
Call 单击(intX, intY, "单击点赞")
End If
End If
If CmpColorEx("541|1876|DADADA,32|1821|F8F8F8,958|1825|F8F8F8,25|1769|D3D3D3,
588|1769|D3D3D3,1060|1769|D3D3D3,759|1876|E1E1E1,561|1120|FFFFFF",0.9) = 1 Then
Exit While
End If
Swipe 1000, screenY / 2, 1000, screenY / 2 - 400
Delay 1000
Wend
海马安卓模拟器版:
Dim screenX,screenY,deviceID,colorDep,shijian
screenX = GetScreenX()
screenY = GetScreenY()
colorDep = GetScreenColorDep()
deviceID = GetDeviceID()
Dim dTime=1000
Dim dlTime=2000
Dim cTime=500
Sub 信息提示(内容)
TracePrint 内容
ShowMessage 内容
Delay dTime
End Sub
Sub 单击(x, y,含义)
Touch x, y, cTime
TracePrint 含义
Delay dTime
End Sub
Sub 单击T(x,y,t,含义)
Touch x,y,t
TracePrint 含义
Delay dTime
End Sub
Call 信息提示("启动微信~")
RunApp "com.tencent.mm"
Delay dlTime
Call 单击(450, 1220,"单击发现")
Call 单击(250, 230, "单击朋友圈")
While True
Dim intX,intY
FindMultiColor 651,235,699,813,"B09385","-8|0|F8F8F8,8|1|F8F8F8,-19|2|B09385,-1|9|B09385"
,0,0.9,intX,intY
If intX > -1 And intY > -1 Then
Call 单击(intX, intY, "单击")
FindMultiColor 306,159,380,955,"3F3A39","24|-2|3F3A39,2|33|3F3A39,
24|-26|3F3A39,48|8|3F3A39,23|21|3F3A39,44|4|FFFFFF,39|-8|C9C8C8,49|-3|FFFFFF,
53|1|C5C4C4",0,0.9,intX,intY
If intX > -1 And intY > -1 Then
Call 单击(intX, intY, "单击点赞")
End If
//Call 单击(intX-367, intY, "单击点赞")
End If
If CmpColorEx("360|1249|DADADA,117|1249|F5F5F5,624|1251|EDEDED,363|1179|D3D3D3,
632|1216|F8F8F8,31|1236|F8F8F8,355|1215|F8F8F8,165|1213|F8F8F8,672|1223|F8F8F8,
315|1264|F8F8F8",0.9) = 1 Then
Exit While
End If
Swipe screenX / 2, screenY / 2, screenX / 2, screenY / 2 - 300
Delay 1000
Wend
如果你没有安卓手机可以试试,安装模拟器哦 把模拟器的分辨率设置到720*1280 的就可以了 ,快开始你的自动化之旅吧!
如果你还不会使用按键精灵,请看我的这篇文章 https://huangyi.cc/?p=752