//判斷是否在CD
i=0
While i=0
FindPic 608,671,653,714,"Attachment:\有CD.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
i=1
End If
Wend
Key = GetLastKey
If Key = 87 Then
Call 黃牌()
End If
If Key = 50 Then
Call 紅牌()
End If
If Key = 69 Then
Call 藍牌()
End If
Loop
Sub 黃牌()
i=0
While i=0
FindPic 608,671,653,714,"Attachment:\黃色.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
KeyPress "W", 1
i=1
End If
Wend
End Sub
Sub 藍牌()
KeyPress "W", 1
i=0
While i=0
FindPic 608,671,653,714,"Attachment:\藍色.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
KeyPress "W", 1
i=1
End If
Wend
End Sub
Sub 紅牌()
KeyPress "W", 1
i=0
While i=0
FindPic 608,671,653,714,"Attachment:\紅色.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
KeyPress "W", 1
i = 1
End If
Wend
End Sub
這個是以前寫的 現在不壹定能用,僅供參考!