[按键精灵] 纯文本查看 复制代码
Import "zm.luae" //导入插件,只需执行一次
zm.Init
//720*1280
/*********************定义**********************/
Dim ScreenY,ScreenX
ScreenY = GetScreenY()
ScreenX = GetScreenX()
Dim intX,intY
Dim Fy=0
Dim Fx1,Fx2
Dim 置顶=Array ("5858FF","7|12|5555FF,16|-4|5656FF,30|6|6666FF,11|-9|FFFFFF",0.9)
Dim 分隔线=Array ("FFFFFF","30|0|D2D2D2,354|0|D2D2D2,369|-1|FFFFFF,689|0|D2D2D2,719|0|FFFFFF",1)
Dim 红包=Array ("26EDF7","-4|-10|5C73FF,-8|-22|F6F7FF,-6|-37|EDEFFB,-3|-37|535FFF",0.95)
/*********************检测**********************/
Dim 领取=Array("007FFF","-24|-8|007FFF,-16|0|54DEFF,-15|-27|FFFFFF",1)
Dim 我知道了=Array("FFFFFF","30|4|FAFDFF,69|-2|FFFFFF,83|2|1AA1FF,-13|3|1AA1FF",0.9)
Dim 忽略=Array ("30322E","11|0|30322E,1|22|30322E,30|9|30322E,49|22|30322E,22|10|F7F7F7",0.95)
'TracePrint FCex(584,61,705,128,领取, 0)
//TracePrint FCex(0,0,0,0,分隔线, 0)
//TracePrint intX,intY
zm.Swipe 12, 457, 12, 1046, 500
Delay 3000
Do
Do
If FCex(584,61,705,128, 领取, 1) Then
TracePrint "领红包"
ElseIf FCex(163,797,267,847,忽略, 1) Then
TracePrint "忽略"
ElseIf FCex(293, 769, 427, 810, 我知道了, 1) Then
ElseIf FCex(0, 0, 0, 0, 分隔线, 0) Then
Exit Do
End If
Loop
If FCex(0, Fy, ScreenX, ScreenY, 分隔线, 0) Then
Fx1=intX:Fx2=intY
If FCex(0, intY - 80, intX + 140, intY, 置顶, 0) Then
Fy = intY + 90
TracePrint "是置顶"
Else
Tap Fx1 + 80, Fx2 - 140
刷分
KeyPress "back"
zm.Swipe 12, 457, 12, 1046, 500
Delay 3000
Fy = 0
End If
Else
Fy = 0
zm.Swipe 12, 457, 12, 1046, 500
Delay 3000
End If
Loop
Sub 刷分()
Dim 次数=0,Thread1
Do
If FCex(535, 703, 680, 856, 红包, 0) Then
Delay 2000
Thread1 = Thread.Start(滑屏)
Do
If FCex(535, 703, 680, 856, 红包, 0)=False Then
次数 = 次数 + 1
Delay 3000
End If
Delay 100
Loop While 次数 < 3
Thread.Stop (Thread1)
Exit Sub
End If
Loop
End Sub
Sub 滑屏()
Dim 开头,结尾
Dim mode = 0
Do
If mode = 0 Then
zm.Swipe 16, 745, 16, 498, 500
结尾 = CmpColor(717, 1066, "F6F6F6", 1)
TracePrint "结尾",结尾
Delay 1000
If 结尾 = -1 Then
mode=1
End If
TracePrint "下"
Else
zm.Swipe 16, 498, 16, 745, 500
开头 = CmpColor(715, 251, "F6F6F6", 1)
Delay 1000
If 开头 = -1 Then
mode=0
End If
TracePrint "上"
End If
Loop
End Sub
Function FCex(x,y,x1,y1,arr,mode)
FCex=False
FindMultiColor x,y,x1,y1,arr(0),arr(1),0,arr(2),intX,intY
If intX>-1 And intY>-1 Then
If mode = 1 Then
Tap intX, intY
FCex = True
Exit Function
ElseIf mode = 0 Then
FCex = True
Exit Function
End If
End If
End Function