Call 大漠
Delay 10
hwnd = dm.FindWindow("SDL_app","Androidscreen")
If hwnd = 0 Then
MsgBox "投屏窗口不存在", 4096
EndScript
End If
Delay 50
TracePrint hwnd
Delay 50
dm_ret = dm.SetWindowSize(hwnd,460,1047)'修改窗口大小
Delay 50
dm.MoveWindow hwnd,0,0'移动窗口位置
Delay 50
//前台 鼠标:前台键盘:前台 模式0
dm_ret = dm.BindWindow(hwnd,"normal","normal","normal",0)
If dm_ret = 0 Then
MsgBox "绑定失败",4096
EndScript
End If
////////////////////////////////////////////////////
Delay 100
Text = Plugin.File.ReadFileEx("D:\内测五雷工资号\2角色浮生答题.txt")
T_Text = split(Text, "|")
For i = 0 To UBound(T_Text) - 1
账号 = split(T_Text(i), "----")(0)
密码 = split(T_Text(i), "----")(1)
TracePrint "第 " & i + 1 & " 个账号是 " & 账号 & " 密码是 " & 密码
Call Plugin.Sys.SetCLB(账号)'把获取到的账号放入剪切板
Call 登录()
Call 任务()
Next
Sub 登录()
Do
Delay 500
If 识_图(165,165,292,260,"登录界面.bmp") Then
TracePrint "登录界面"
Call zj(206,369)'点击账号框
For 20
Delay 10
KeyPress "BackSpace", 1'删除原账号
Next
Delay 300
KeyDown 17, 1
Delay 300
KeyPress 86, 1'粘贴账号
Delay 300
KeyUp 17, 1
Delay 200
KeyPress "Enter", 1
Delay 300
Call zj(324,574)'点击登录
Exit Do
End If
TracePrint "检测输入账号" & time
Loop
Do
Delay 100
If 识_图(34,118,404,197,"线路选择.bmp") Then
TracePrint "线路选择"
Delay 500
Call zj(256,552)'点击线路4
Exit Do
End If
TracePrint "检测线路选择" & time
Loop
Do
Delay 100
If 识_图(3,71,451,657,"选择角色.bmp") Then
TracePrint "选择角色"
Delay 500
Call zj(64,392)'点击第1角色
Exit Do
End If
TracePrint "检测角色界面" & time
Loop
Do
Delay 100
If 识_图(266,739,405,802,"公告确定.bmp") Then
TracePrint "公告确定"
Delay 500
Call zj(intX,intY)'点击公告确定
End If
If 识_图(266,739,405,802,"公告返回.bmp") Then
TracePrint "公告返回"
Delay 100
Call zj(intX, intY)'点击公告返回
Delay 50
For 4
Delay 10
Call zj(223,665)'点击空白出,防止有窗口未关闭×口
Next
Exit Do
End If
TracePrint "检测公告界面" & time
Loop
End Sub
Sub 任务
Delay 300
Call zj(344, 407)'点击浮生录
Delay 300
Call zj(328, 211)'点击化身集
Delay 300
Call zj(186, 751)'点击对话
Do
Delay 500
If 识_图(5,353,169,448,"大.bmp") =True
TracePrint "找到1-1题目"
Call zj(159,503)'点击答题位置1
Delay 200
Call zj(159, 503)'点击答题位置1
Exit Do
ElseIf 识_图(5,353,169,448,"白.bmp") =True
TracePrint "找到1-2题目"
Call zj(159,503)'点击答题位置1
Delay 200
Call zj(167, 551)'点击答题位置2
Exit Do
ElseIf 识_图(5,353,169,448,"小.bmp")=True
TracePrint "找到2-2题目"
Call zj(167, 551)'点击答题位置2
Delay 200
Call zj(167, 551)'点击答题位置2
Exit Do
ExitIf 识_图(5,353,169,448,"敖.bmp") =True
TracePrint "找到2-1题目"
Call zj(167, 551)'点击答题位置2
Delay 200
Call zj(159, 503)'点击答题位置1
End If
Loop
End Sub
For 3
Delay 300
Call zj(220, 649)'关闭弹窗
Next
Delay 300
Call zj(420, 195)'关闭浮生录
Delay 300
Call zj(417,712)'点击退出
Delay 300
Call zj(297,531)'点击确定
Function 识_图(x1, y1, x2, y2, 图片名)
Delay 50
dm_ret = dm.FindPic(x1,y1,x2,y2,图片名,"050505",0.8,0,intX,intY)
If intX >= 0 and intY >= 0 Then
识_图 = true
Else
识_图 = false
End If
End Function
Sub zj(x, y)
Delay 200
dm.MoveTo x, y
Delay 150
dm.LeftClick
Delay 200
End Sub
////////////////////////////////////////////////////
Sub OnScriptExit()
Delay 10
dm_ret = dm.UnBindWindow()
Delay 10
End Sub
////////////////////////////////////////////////////
////////////////////////////////////////////////////
Sub 大漠
PutAttachment "C:\dnf_pm", "*.*"
PutAttachment ".\Plugin","RegDll.dll"
Call Plugin.RegDll.Reg("C:\dnf_pm\dm.dll")'注册大漠
Set dm = createobject("dm.dmsoft")'创建对象
If len(dm.ver())>0 Then'检查是否注册成功
Else
MessageBox "大漠注册失败"
EndScript
End If
dm_ret = dm.SetPath("C:\dnf_pm")'设置全局路径
dm_ret = dm.SetDict(0, "dm_soft.txt")'创建字库
End Sub
////////////////////////////////////////////////////