按键精灵新手,求解答 until问题

2024-11-03 05:28:59
推荐回答(1个)
回答1:

Dim t0, t
Dim rColor1, rColor2, rColor3, rColor4, rColor5
t0=time()
rColor1 = GetPixelColor(152,1138)
rColor2 = GetPixelColor(490,1151)
rColor3 = GetPixelColor(880,1220)
rColor4 = GetPixelColor(215,1700)
rColor5 = GetPixelColor(800,1700)
Do // 之所以这么写是为了代码执行效率 也可以 Until ColorDiff(rColor1, "FFFFFF")<=20 AND ColorDiff(rColor2, "FFFFFF")<=20 AND 。。。
If ColorDiff(rColor1, "FFFFFF")<=20 Then
IF ColorDiff(rColor2, "FFFFFF")<=20 Then
IF ColorDiff(rColor3, "FFFFFF")<=20 Then
IF ColorDiff(rColor4, "FFFFFF")<=20 Then
IF ColorDiff(rColor5, "FFFFFF")<=20 Then
Exit Do
End If
End If
End If
End If
End If
Loop
t = Time()-t0
TracePrint t