dim number,x,y //当前窗口左上角坐标坐标x1,y1 Plugin WinTop=Window.Foreground() Plugin RectTop=Window.GetClientRect(WinTop) TempArray=Split(RectTop,"|") x1=CInt(TempArray(0)):y1=CInt(TempArray(1)) //x坐标百位数所在位置 //121是x坐标百位数相对于窗口坐标的位置 x=x1+121:y=y1+10 Gosub 找数字 a=number //x坐标十位数所在位置 x=x1+128:y=y1+10 Gosub 找数字 b=number //x坐标个位数所在位置 x=x1+135:y=y1+10 Gosub 找数字 c=number Gosub 坐标 //x坐标值 mx=n x=x1+155:y=y1+10 Gosub 找数字 a=number x=x1+162:y=y1+10 Gosub 找数字 b=number x=x1+169:y=y1+10 Gosub 找数字 c=number Gosub 坐标 //y坐标值 my=n VBSCall MessageBox (mx&"/"&my) EndScript //a是百位数,b是十位数,c是个位数 Sub 坐标 //b不存在,坐标只有一位数 If b=-1 n=a Else //b存在,c不存在,坐标有二位数 If c=-1 n=a*10+b Else //坐标有三位数 n=a*100+b*10+c EndIf EndIf Return //基本思路:将 0123456789 不断进行分组,直至该组中只有一个数字。 Sub 找数字 //2345 IfColor x+2,y+6,f8fcf8,0 //23 IfColor x+6,y+1,f8fcf8,0 //2 IfColor x+6,y+8,f8fcf8,0 number=2 Else number=3 EndIf //45 Else //5 IfColor x+1,y,f8fcf8,0 number=5 Else number=4 EndIf EndIf //016789 Else //89 IfColor x,y+1,f8fcf8,0 //9 IfColor x,y+3,f8fcf8,0 number=9 Else number=8 EndIf //0167 Else //67 IfColor x+6,y,f8fcf8,0 //7 IfColor x+1,y,f8fcf8,0 number=7 Else number=6 EndIf //01 Else //0 IfColor x+2,y,f8fcf8,0 number=0 Else IfColor x+3,y,f8fcf8,0 number=1