While not found and outi<3
            If intX>0 and intY>0 then
                MoveTo intX,intY
                Delay 1000
                LeftClick 2                    
                found=true
            End if
            If not found then
                Call FindPic(150,100,1100,650,"傲视天地\按钮开始训练.bmp",0.9,intX,intY)
                Delay 500
                If intX>0 and intY>0 then
                  
                Else
                  Call FindPic(150,100,1100,650,"傲视天地\按钮结束训练.bmp",0.9,intX,intY)
                  Delay 500
                  If intX>0 and intY>0 then
                     found=true
                     if XLTuFeiMengJin=5 then //突飞猛进开启
                       MoveTo intX,intY+32
                       Delay 1000
                       LeftClick 2 
                     end If
                  End If
                End If
            end If
            outi=outi+1
        Wend
        End If
        Rem 训练结束
        Call FindPic(150,100,1100,650,"傲视天地\按钮训练界面确定.bmp",0.9,intX,intY)
        If intX>0 and intY>0 then
           MoveTo intX,intY  
           Delay 1000
           LeftClick 2  
        End If
        Call FindPic(150,100,1100,650,"傲视天地\按钮训练界面关闭.bmp",0.9,intX,intY)
        If intX>0 and intY>0 then
           MoveTo intX,intY   //关闭训练界面
           Delay 1000
           LeftClick 2  
        End If
      call 关闭错误提示窗口
      If YiBing=1 then //自动取义兵 
        found=false:outi=0
        Call FindPic(150,100,1100,650,"傲视天地\兵营.bmp",0.9,intX,intY)
        While not found and outi<3
            If intX>0 and intY>0 then
                MoveTo intX,intY
                Delay 1000
                LeftClick 2                    
                found=true
            End if
            If not found then
                Call FindPic(150,100,1100,650,"傲视天地\兵营.bmp",0.9,intX,intY)
                Delay 500                
            end If
            outi=outi+1
        Wend
        Delay 1000
        Call FindPic(150,100,1100,650,"傲视天地\按钮兵营义兵.bmp",0.9,intX,intY)
           If intX>0 and intY>0 then
              found=true
              MoveTo intX,intY
              Delay 1000
              LeftClick 2                      
           End If

        found=false:outi=0
        Call FindPic(150,100,1100,650,"傲视天地\按钮关闭窗口.bmp",0.9,intX,intY)
        While not found and outi<3
            If intX>0 and intY>0 then
                MoveTo intX,intY
                Delay 500
                LeftClick 2                    
                found=true
            End if
            If not found then
                Call FindPic(150,100,1100,650,"傲视天地\按钮关闭窗口.bmp",0.9,intX,intY)
                Delay 500
            end If
            outi=outi+1
        Wend 
      End If//自动取义兵结束
      call 关闭错误提示窗口
    Else 
        Delay 100
        //延时100毫秒
        Call MessageBox("没找到颜色"&"Cor("&s&")")
        //弹出窗口 没有找到颜色
    End If
    //条件结束
End If 
Delay 20000
wend
Sub 关闭错误提示窗口
  Call FindPic(150,100,1100,650,"傲视天地\按钮错误确定.bmp",0.9,intX,intY)
  If intX>0 and intY>0 then
        MoveTo intX,intY
        Delay 500
        LeftClick 2