按键精灵循环找到图后,执行命令,再回去找同一图,一直循环1分钟结束,期间包括执行命令的时间,怎么写?

如题所述

代码入下

While intX <1'当找不到这个图的时候,是一直循环的

Delay 300

FindPic 1500,425,1928,661,"Attachment:\1.bmp",1,intX,intY

If intX >0 Then'找到图后,会停止循环,就可以执行对应命令了

Call 这边子程序写要执行的命令()

End If

Wend

Sub 这边子程序写要执行的命令()

End Sub


温馨提示:答案为网友推荐,仅供参考
第1个回答  2022-05-16
Sub 命令
//命令程序
Delay 1000
End Sub
FindPic 1500, 425, 1928, 661, "Attachment:\1.bmp", 1, intX, intY
If intX > 0 Then
Call 命令
End If
aa = now
Do
FindPic 1500, 425, 1928, 661, "Attachment:\1.bmp", 1, intX, intY
If intX > 0 Then
Call 命令
End If
Delay 1000
If DateDiff("s", aa, now) > 60 Then Exit Do
Loop
相似回答