Sub 登录操作()
Tap 319,492
Do
Delay 2000
If FindImg("guanbi.png") > -1 Then
Tap ImgX ,ImgY
End If
Delay 3000
If FindImg("同意.png") > -1 Then
Tap ImgX ,ImgY
End If
Delay 2000
If FindImg("登录2.png") > -1 Then
Tap ImgX ,ImgY
End If
Delay 2000
If FindImg("登录.png") > -1 Then
Tap ImgX, ImgY
Delay 2000
If FindImg("登录1.png") = -1 Then
Tap 501, 54
Delay 200
Tap 501, 54
Delay 2000
If FindImg("登录1.png") > -1 Then
Delay 800
Tap 334, 525
Delay 500
zmvip.KeyPressStr codes(0)
Delay 2000
Tap 250, 523
Delay 500
zmvip.KeyPressStr codes(1)
Delay 500
Tap ImgX, ImgY
Delay 3000
If FindImg("同意.png") > -1 Then
Tap ImgX ,ImgY
End If
Exit Do
End If
Else
If FindImg("登录1.png") > -1 Then
Delay 800
Tap 334, 525
Delay 500
zmvip.KeyPressStr codes(0)
Delay 2000
Tap 250, 523
Delay 500
zmvip.KeyPressStr codes(1)
Delay 500
Tap ImgX, ImgY
Delay 3000
If FindImg("同意.png") > -1 Then
Tap ImgX ,ImgY
End If
Exit Do
End If
End If
Else
Tap 501, 54
Delay 200
Tap 501, 54
Delay 2000
If FindImg("登录1.png") > -1 Then
Delay 800
Tap 334, 525
Delay 500
zmvip.KeyPressStr codes(0)
Delay 2000
Tap 250, 523
Delay 500
zmvip.KeyPressStr codes(1)
Delay 500
Tap ImgX, ImgY
Delay 3000
If FindImg("同意.png") > -1 Then
Tap ImgX ,ImgY
End If
Exit Do
End If
End If
Loop
Delay 6000
Tap 319, 492
Delay 2000
If FindImg("同意.png") > -1 Then
Tap ImgX ,ImgY
End If
Delay 1000
Tap 194,516
Delay 2000
If zmvip.OcrBaiDuInit("RkZd4GcPuGmb66fYYQi1Qq3a", "fB8a1PIAvRq9rEALezcQ5F90pHp1LGHS") Then
TracePrint "设置百度云识别成功"
Else
TracePrint "设置百度云识别失败"
End If
Do
Tap 404, 275
Delay 1000
ret = zmvip.FindStrBaiDu(56,199,451,384,输入框1值)
If ret Then
TracePrint "可以用以下3种格式获取返回值"
TracePrint "找到序号" & ret(0), "x=" & ret(1), "y=" & ret(2), "文字=" & ret(3)
Tap ret(1), ret(2)
Delay 2000
Do
ret = zmvip.FindStrBaiDu(59, 361, 364, 789, 输入框2值)
If ret Then
Tap ret(1), ret(2)
Delay 1000
If FindImg("对了.bmp") = -1 Then
Tap 72,330
End If
Delay 500
Tap 115,487
Exit Do
End If
Delay 1000
Loop
Exit Do
End If
Delay 2000
Loop
For 10
If FindImg("角色.png") > -1 Then
Tap ImgX, ImgY
Exit For
End If
Delay 1000
Next
Do
If FindImg("页面.png") > -1 Then
For 5
Tap 30, 586
Delay 1000
Tap 91, 848
Delay 3000
If FindImg("错误.png") > -1 Then
Tap ImgX, ImgY
Else
Exit For
End If
Delay 1000
Next
Delay 6000
If FindImg("黑屏.png") > -1 Then
Tap ImgX, ImgY
Delay 3000
Tap 190, 778
Delay 1000
If FindImg("关闭6.png") > -1 Then
Tap ImgX, ImgY
End If
Exit Do
End If
End If
Delay 5000
If FindImg("黑屏.png") > -1 Then
Tap ImgX, ImgY
Delay 3000
Tap 190, 778
Delay 1000
If FindImg("关闭6.png") > -1 Then
Tap ImgX, ImgY
End If
Exit Do
End If
ShowMessage "判断是否进入游戏"
For 3
If FindImg("关闭1.png|关闭.png|关闭1.bmp|关闭3.bmp|关闭6.png|登录2.png|黑屏.png|guanbi.png") > -1 Then
Tap ImgX ,ImgY
Else
TracePrint ImgX ,ImgY
End If
Delay 1500
Next
If FindImg("马.png") > -1 Then
If FindImg("黑屏.png") > -1 Then
Tap ImgX, ImgY
Delay 3000
Tap 190, 778
Delay 1000
If FindImg("关闭6.png") > -1 Then
Tap ImgX, ImgY
End If
Exit Do
End If
Exit Do
End If
Loop
Delay 3000
Tap 363, 112
Delay 800
FindPic 0,0,0,0, "Attachment:关闭1.bmp", "202020", 0, 0.8, intX, intY
If intX > -1 And intY > -1 Then
TracePrint intX, intY
Tap intX, intY
End If
ShowMessage "登录成功",0,0,0
Call 第一功能()
End Sub