PutAttachment "c:\test_game" ,"*.*"
PutAttachment ".\Plugin" ,"RegDll.dll"
Call Plugin.RegDll.Reg("c:\test_game\dm.dll")
set dm = createobject("dm.dmsoft")
ver = dm.Ver()
If len(ver) = 0 Then
MessageBox "创建对象失败,检查系统是否禁用了vbs脚本权限"
EndScript
End If
hwnd = dm.GetMousePointWindow()
dm_ret = dm.BindWindow(hwnd,"dx2","dx2","dx",0)
t1=time //将当前时间赋值给t1
Rem go
t2=time
tt=datediff("s",t1,t2) //用t2-t1,结果给tt。s秒n分h时,只能到时,精确到秒。
ttt=cint(tt) //把tt转为数值型 ,非常重要,因为tt是个时间变量,不能参与大小计算
//cint(X),将数值型数据x的小数部分四舍五入取整
if ttt>600
dm.MoveTo 15,11
Delay 1000
dm.LeftClick
t1=time //一样重要,这个保证在你鼠标动作之后,能把时间重新赋值t1,以便之后计算
End If
Delay 1000
Goto go
EndScript
Sub OnScriptExit()
dm_ret = dm.UnBindWindow()
End Sub