Goto 找第二个
            EndIf 
        EndIf 
        If simil > 0
            simil=0
            VBSCall Call FindPic(x1,y1,tmpx2,y2,"bmp\"&filename(nn),0.9,x,y)
            If x> 0
                ma(mm)=left(filename(nn),1)
                xu(mm)=x
                ll=mm
                If mm > 0
                    For mm
                        If xu(ll) < xu(ll-1)
                            tmp=xu(ll-1)
                            xu(ll-1)=xu(ll)
                            xu(ll)=tmp
                            tmp=ma(ll-1)
                            ma(ll-1)=ma(ll)
                            ma(ll)=tmp
                        EndIf 
                        ll=ll-1
                    EndFor 
                EndIf 
                mm=mm+1
            EndIf 
        EndIf 
        dx=x1
        nn=nn-1
    EndWhile 
    currtime=date
    currtime= currtime&" " &time
    str="["&cstr(currtime)&"]结束读验证码!!"&ma(0)&ma(1)&ma(2)&ma(3)
    Gosub 记运行日志5
    SayString(ma(0)&ma(1)&ma(2)&ma(3))
    str=join(ma,"")
    errfilename="读验证码"&str
    Delay chbtime
    //点确定
    MoveTo 707,360
    Delay chbtime
    LeftClick 1
    Delay chbtime
Return 读验证码
Sub 退出模块
    //关音乐,音效等,(600,270)(600,310)
    //退出(396,550),返回(510,550),回城门(630,550)
    MoveTo 188,733
    xx=2
    While xx > 0
        IfColor 311,576,397908,2
            MoveTo 396,553
            Delay 5*dltime
            LeftClick 1
            Delay dltime
            xx=-2
        Else 
            LeftClick 1
            Delay dltime
        EndIf 
        Gosub 重新进入
    EndWhile 
    // 退一
    xx=2
    While xx > 0
        IfColor 337,368,429a10,2
            MoveTo 461,427
            Delay dltime
            LeftClick 1
            Delay dltime
            xx=-2
        Else 
            LeftClick 1
            Delay dltime
        EndIf 
        Gosub 重新进入
    EndWhile 
Return 退出模块
//记运行日志模块
Sub 记运行日志5
    If logflag > 4
        Gosub 记运行日志
    EndIf 
Return 记运行日志5
Sub 记运行日志10
    If logflag > 9
        Gosub 记运行日志
    EndIf 
Return 记运行日志10
Sub 记运行日志
    set myfile=fso.opentextfile(filepath&"运行日志.txt",8)
    myfile.writeline(str )
    myFile.Close
Return 记运行日志
//杀当前进程
Sub winclose
    dim handle,stitle
    Plugin handle = Window.Foreground()
    Plugin stitle = Window.GetText(handle)
    Plugin Window.Close(handle)
Return winclose