For 5 IfColor baox-3,baoy+5,0,0 IfColor baox-3,baoy-12,0,0 IfColor baox-3,baoy+11,0,0 Goto 关闭宝箱 EndIf EndIf EndIf MoveTo baox,baoy Delay dltime LeftClick 1 Delay 2*dltime //确定卖宝 baox=baox+50 MoveTo 513,358 Delay 2*dltime LeftClick 1 Delay 2*dltime EndFor baoy=baoy+51 baox=728 EndFor Rem 关闭宝箱 MoveTo 729,120 Delay dltime LeftClick 1 Delay dltime time2 = obj.GetTickCount() currtime=date currtime= currtime&" " &time str=cstr(ttlcount)&"卖宝=["&cstr(currtime)&"]--完成!!耗时:" & CStr(int((time2-time1)/1000)) & "秒 " Gosub 记运行日志 time1 = obj.GetTickCount() Return 卖宝 Sub 读验证码 dim filename,ma,nn,mm filename= Array("00.bmp","01.bmp","02.bmp","10.bmp","11.bmp","12.bmp","90.bmp","91.bmp","92.bmp","20.bmp","21.bmp","22.bmp","30.bmp","31.bmp","32.bmp","40.bmp","41.bmp","42.bmp","50.bmp","51.bmp","52.bmp","60.bmp","61.bmp","62.bmp","70.bmp","71.bmp","72.bmp","80.bmp","81.bmp","82.bmp" ) ma= Array("0","0","0","0") nn=29 x=-2 While x<0 //点确定 MoveTo 831,705 LeftClick 1 Delay 0.2*dltime IfColor 161,409,292cd6,0 x=2 EndIf IfColor 161,409,2920ef,0 x=2 EndIf IfColor 161,409,4a49f7,0 x=2 EndIf IfColor 161,409,6bd7ef,0 x=2 EndIf IfColor 262,397,5251de,0 x=2 EndIf Gosub 重新进入 EndWhile Rem 开始 // 开始 //记时开始 //currtime=date // currtime= currtime&" " &time //str="["&cstr(currtime)&"]开始读验证码!!"&ma(0)&ma(1)&ma(2)&ma(3) // Gosub 记运行日志 //nnn mm=0:nn=29:ll=0:x1=598:y1=268:x2=670:y2=302 dim xu(4),tmp,simil,tmpx2,tmpx dx=x1:x=0:tmp=0:simil=0:tmpx2=0 While nn >= 0 Rem 找第二个 VBSCall Call FindPic(dx,y1,x2,y2,"bmp\"&filename(nn),0.9,x,y) If x> 0 If simil=0 tmpx2=x+1 EndIf simil=1 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 If (x< (x2-12)) and mm < 4 dx=x+5