Key=WaitKey()
If Key = 81 Then
BeginThread 线程1
End If
Loop
Sub 线程1()
PutAttachment "c:\test_game","*.*"
set ws=createobject("Wscript.Shell")
ws.run "regsvr32 c:\test_game\dm.dll /s"
set ws=nothing
Delay 1500
Set dm = CreateObject("dm.dmsoft")
ver = dm.Ver()
If len(ver) = 0 Then
MessageBox "创建对象失败,检查系统是否禁用了vbs脚本权限"
EndScript
End If
base_path = dm.GetBasePath()
dm_ret = dm.SetPath(base_path)
hwnd = dm.GetMousePointWindow()
dm_ret = dm.BindWindow(hwnd, "dx2", "dx", "dx", 0)
Delay 1000
Rem 开始
Delay 7000
dm_ret = dm.FindPic(0,0,2000,2000,"鱼饵.bmp","000000",0.9,0,intX,intY)
If intX >= 0 Then
dm.MoveTo intX, intY
Delay 100
dm.RightClick
End If
Delay 500
dm.KeyPress 49
Delay 500
While i=0
dm_ret = dm.FindColor(381,218,420,301,"f4f0f4-000000",1.0,0,intX,intY)
If intX >= 0 and intY >= 0 Then
Delay 2500
dm.KeyPress 49
Goto 开始
End If
Wend
End Sub