按键精灵中当找到颜色时执行一段代码并循环,找不到则执行下一段代码,逻辑怎么写?
Tap300,392Delay1000Tap541,749//开始盘查Delay1000Touch532,361,1000Delay1000Touch205,259,10...
Tap 300, 392
Delay 1000
Tap 541, 749//开始盘查
Delay 1000
Touch 532, 361, 1000
Delay 1000
Touch 205,259, 1000
Delay 1000
Tap 110, 117
Delay 1000
Tap 991, 257
Delay 1000
Tap 519, 1861//确认
Delay 2000
Dim intX, intY
//如果没有找到,intX和intY的值都会被置为-1
FindColor 13, 475, 146, 593, "CCCCCC", 0, 0.90, intX, intY
If intX > -1 And intY > -1 Then
Touch intX+100, intY+100, 1000
Delay 1000
Touch 440, 253, 1000
Delay 1000
Tap 112, 424
Delay 1000
Tap 1039, 253
Delay 1000
Tap 529, 1854
Delay 1000
End If
Else
Tap 415, 1854//提交盘查结果 展开
Delay 1000
Tap 541, 749//开始盘查
Delay 1000
Touch 532, 361, 1000
Delay 1000
Touch 205,259, 1000
Delay 1000
Tap 110, 117
Delay 1000
Tap 991, 257
Delay 1000
Tap 519, 1861//确认
Delay 2000
Dim intX, intY
//如果没有找到,intX和intY的值都会被置为-1
FindColor 13, 475, 146, 593, "CCCCCC", 0, 0.90, intX, intY
If intX > -1 And intY > -1 Then
Touch intX+100, intY+100, 1000
Delay 1000
Touch 440, 253, 1000
Delay 1000
Tap 112, 424
Delay 1000
Tap 1039, 253
Delay 1000
Tap 529, 1854
Delay 1000
End If
Else
Tap 415, 1854//提交盘查结果 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询