|
发表于 2011-6-22 07:53:00
|
显示全部楼层
Re:?????????????
//???,??????????
Dim Num(9)
Num(0) = "1000110001"
Num(1) = "0010000100"
Num(2) = "0000100010"
Num(3) = "0000100110"
Num(4) = "0101001010"
Num(5) = "1111010001"
Num(6) = "1000011110"
Num(7) = "0001000100"
Num(8) = "1000101110"
Num(9) = "1000101111"
Function ???(StartX, StartY)
Dim x, y
Dim iY, iX
Dim temp
temp = ""
x = StartX : y = StartY + 9
If GetPixelColor(x, y) = "000000" Then
??? = - 1 //????????????-1
Exit Function
End If
x = StartX : y = StartY + 5
If GetPixelColor(x, y) = "000000" Then
If GetPixelColor(x + 1, y) = "000000" Then
??? = - 3 //????????????-3
Exit Function
End If
End If
x = StartX : y = StartY + 3
For iY = 0 To 1
For iX = 0 To 4
If GetPixelColor(x+iX, y+iY) = "000000" Then
temp = temp & "1"
Else
temp = temp & "0"
End If
Next
Next
For iX = 0 To 9
If temp = Num(iX) Then
??? = iX //??????????????
Exit Function
End If
Next
??? = -2 //????????????-2
End Function
Function ??????()
Dim intX, intY
Dim Flag //?????????
Dim result
result = "" //?????
FindPic 0,0,1024,768,"Attachment:\???.bmp",1,intX,intY //????????????????
If intX > 0 And intY > 0 Then
intX = intX + 33 : intY = intY + 2 //????????
Else
FindPic 0,0,1024,768,"Attachment:\???1.bmp",1,intX,intY //????????????????
If intX > 0 And intY > 0 Then
intX = intX + 27 : intY = intY + 3 //????????
Else
?????? = result
TracePrint "??????????????????????????"
Exit Function
End If
End If
Do
Flag = ???(intX, intY)
If Flag > - 1 Then
result = result & Cstr(Flag)
intX = intX + 6 // > -1 ?????????????????6??
ElseIf Flag = - 3 Then
result = result & "-"
intX = intX + 3 // -1?????????????????3??
ElseIf Flag = - 1 Then
result = result & ","
intX = intX + 3 // -1?????????????????3??
End If
Loop While Flag <> -2 //???????????????-2????????????
?????? = result
End Function
Sub ?????????(x, y, K,T) //x,y?????,K?????,T??????????
//???????????
// ????????????????????????????????????????????????????
// ??????????3?????????????1 ? K= 3/1
// ????? ??????????x?y????????T??????????????T???????????????
Dim nowXYarray
Dim runFlag
Dim NowX,NowY
Dim TracePrintStr
runFlag = true
While runFlag
TracePrintStr = ""
nowXYarray = split(??????(), ",")
If UBound(nowXYarray) >= 1 Then
If (nowXYarray(0) <> "" and nowXYarray(1) <> "") Then
nowX = CInt(nowXYarray(0)):nowY=CInt(nowXYarray(1))
If (x = nowX and y = nowY) Then
runFlag = false
Else
If abs(x - nowX) > T Then
MoveR Round((x-nowX)*K),0
Else
If x - nowX > 0 Then
MoveR 1, 0
TracePrintStr = TracePrintStr&">>X+1"
ElseIf x - nowX < 0 Then
MoveR - 1 , 0
TracePrintStr = TracePrintStr&">>X-1"
End If
End If
If abs(y - nowY) > T Then
MoveR 0,Round((y-nowY)*K)
Else
If y - nowY > 0 Then
MoveR 0, 1
TracePrintStr = TracePrintStr&">>Y+1"
Elseif y - CInt(nowY) < 0 Then
MoveR 0, - 1
TracePrintStr = TracePrintStr&">>Y-1"
End If
End If
TracePrint "X=" & Cstr(x - nowX) & ",Y=" & Cstr(y - nowY)&TracePrintStr
End If
End If
End If
LeftClick 1
Delay 30
Wend
End Sub
/////////////////////////////////?????????
Call ?????????(50, 50, 2.5,3)//????K?2.5?T?3?????K?3???????????
//??????????????????????????
//???????????y????????????????????????????? |
|