Set dm = createobject("dm.dmsoft")
dm.SetPath("D:\Chater\DAMO\test_tmp")
dm_ret = dm.LoadPic("*.bmp")
hwnd = dm.GetMousePointWindow()
dm_ret = dm.SetWindowState(hwnd,1)
dm_ret = dm.BindWindow(hwnd,"dx","normal","dx",0)
Delay 200
//下面调试是否成功綁定窗口
If dm_ret = 0 Then
MessageBox "Fail"
EndScript
Else
MessageBox "Done"
End If
//开始找图
Rem Find1
px=42:py=22
dm_ret = dm.FindPic(0,0,1366,768,"01.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 49
Delay 500
Goto Find1
Else
Goto Find2
End If
Rem Find2
px=42:py=22
dm_ret = dm.FindPic(0,0,1366,768,"02.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 50
Delay 500
Goto Find1
Else
Goto Find3
End If
Rem Find3
px=42:py=22
dm_ret = dm.FindPic(0,0,1366,768,"03.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 51
Delay 500
Goto Find1
Else
Goto Find4
End If
Rem Find4
px=42:py=22
dm_ret = dm.FindPic(0,0,1366,768,"04.bmp","000000",0.9,0,intX,intY)
If intX >= 0 and intY >= 0 Then
dm.KeyPress 52
Delay 500
Goto Find1
Else
Goto Find1
End If
欢迎光临 TC官方合作论坛 (http://bbs.52tc.co/) | Powered by Discuz! X3.1 |