deny
Новичок
- Сообщения
- 50
- Репутация
- 2
Код:
#include <ImageSearch.au3>
#include <Array.au3>
Dim $aImgs[3][2] = [["использовал.bmp", 0], ["1.bmp", 0], ["tes.bmp", 0]]
For $i = 0 To UBound($aImgs) -1
Local $x, $y
$aImgs[$i][1] = _ImageSearch($aImgs[$i][0], 1, $x, $y,0)
If $aImgs[$i][1] Then
ExitLoop
Else
MouseClick("left",21,970)
ContinueLoop
EndIf
Next
Почему этот скрипт работает быстрее этого -
Код:
#include <ImageSearch.au3>
$x = 0
$y = 0
While 1
$res = _ImageSearch("test23.bmp",1,$x, $y,10)
If $res = 1 Then
MsgBox(0,"Нашли","Ура",1)
ExitLoop
Sleep(1000)
Else
MsgBox(0, "Not", "Not",1)
ContinueLoop
EndIf
WEnd