|
楼主 |
发表于 2022-12-17 20:49:42
|
显示全部楼层
Sub 调用测试命令
dm_ret = dm.FindStr(0,0,1024,768,"随身回收","eecc00-312821",0.89,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.MoveTo intX, intY
Delay 350
Call 鼠标左键单击(intX, intY)
End If
End Sub
Function 鼠标左键单击(x,y)
dm.MoveTo x, y
Delay 350
dm.LeftClick
End Function
Call 测试1
Sub 测试1
dm_ret = dm.FindPic(0, 0, 1024, 768, "神武.bmp", "050505", 0.79, 0, intX, intY)
TracePrint dm_ret
If intX >= 0 and intY >= 0 Then
MessageBox "找到"
dm.MoveTo intX, intY
Delay 350
Call 鼠标左键单击1(intX, intY)
End If
End Sub
Function 鼠标左键单击1(x,y)
dm.MoveTo x, y
Delay 350
dm.LeftClick
End Function
Call 测试2
Sub 测试2
dm_ret = dm.FindStr(0, 0, 1024, 768, "战神", "60.100.100-44.37.12", 0.6, intX, intY)
TracePrint dm_ret
If intX >= 0 and intY >= 0 Then
dm.MoveTo intX, intY
Delay 350
Call 鼠标左键单击2(intX, intY)
End If
End Sub
Function 鼠标左键单击2(x,y)
dm.MoveTo x, y
Delay 350
dm.LeftClick
End Function
Call 测试3
Sub 测试3
dm_ret = dm.FindStr(0, 0, 1024, 768, "圣天", "ffff00-211c10", 0.6, intX, intY)
TracePrint dm_ret
If intX >= 0 and intY >= 0 Then
dm.MoveTo intX, intY
Delay 350
Call 鼠标左键单击3(intX, intY)
End If
End Sub
Function 鼠标左键单击3(x,y)
dm.MoveTo x, y
Delay 350
dm.LeftClick
End Function
Call 测试4
Sub 测试4
dm_ret = dm.FindStr(0, 0, 1024, 768, "北冥", "ffff00-181410", 0.6, intX, intY)
TracePrint dm_ret
If intX >= 0 and intY >= 0 Then
dm.MoveTo intX, intY
Delay 350
Call 鼠标左键单击4(intX, intY)
End If
End Sub
Function 鼠标左键单击4(x,y)
dm.MoveTo x, y
Delay 350
dm.LeftClick
End Function
Call 测试5
Sub 测试5
dm_ret = dm.FindStr(0, 0, 1024, 768, "合件", "ffff00-1b1910", 0.6, intX, intY)
TracePrint dm_ret
If intX >= 0 and intY >= 0 Then
dm.MoveTo intX, intY
Delay 350
Call 鼠标左键单击5(intX, intY)
End If
End Sub
Function 鼠标左键单击5(x,y)
dm.MoveTo x, y
Delay 350
dm.LeftClick
End Function
老是找字找图,牛头不对马嘴,我都这样写了,用了最笨的方法 |
|