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

PutAttachment "c:\test_game","*.txt" 

dm_ret = dm.SetPath("c:\test_game")
dm_ret = dm.SetDict(0,"dm_soft.txt")



hwnd = dm.FindWindow("","热血昆仑[热血征途(PK)]") 

 
dm_ret = dm.BindWindow(hwnd, "dx", "dx", "dx", 0)
delay 1000
dm.setpath"C:\test_game"

Delay 100
Rem 开始


dm_ret = dm.FindColor(762,321,847,336,"ff0000-000000",1.0,0,intX,intY)
If intX >= 0 and intY >= 0 Then 
    Delay 400
    Call 去做任务
    Delay 200
End If

   
   
Delay 400


Call 接任务
Delay 400

 
Sub 接任务
 	
    Do
        dm_ret= dm.Ocr(104,63,494,396,"ceefc6-000000",1.0)


        dm_ret = dm.FindStr(104,63,494,396,"发布","ceefc6-000000",1.0,intX,intY)
        if intX>0 Then 
           

            dm.MoveTo intX, intY
            Exit Do 
        Else 
            
        End If


    Loop  while 7=7
    //点广成子
    dm.Moveto intX, intY+119
    dm.LeftClick
    Delay 800
    dm.Moveto 112,362
    dm.LeftClick
    Delay 800
    dm.Moveto 621,526
    dm.LeftClick
    Delay 800
    goto 开始	
End Sub



Sub 完成任务
    Do
    
   
        dm_ret = dm.Ocr(104, 63, 494, 396, "ceefc6-000000", 1.0)
   


        dm_ret = dm.FindStr(104,63,494,396,"发布","ceefc6-000000",1.0,intX,intY)
        if intX>0 Then 
            

            dm.MoveTo intX, intY
           
        Else 
            Call 回广成子
        End If

        Exit Do