1 (изменено: Andreyka, 2023-01-16 00:20:35)

Тема: AHK: ImageSearch не реагирует

Привет!
Кое как сделал скрипт. И не могу понять, почему он не работает? Хотелось спросить у вас, в чём может быть проблема?
Не реагирует на картинки.
Часть кода, именно тут ничего не происходит. А должно, при обнаружении картинки, нажать привязанную к ней кнопку.

    Label2:
    sleep 50
    ImageSearch, FoundX, FoundY, 1220, 710, 1330, 790, C:\wasd\w.png
    if ErrorLevel = 0 
       { sleep, 50
       SendInput, {sc11}
        BlockInput, Default
       }
    else ErrorLevel = 1
    { goto, Label3 
    }
    Label3:
    sleep, 50
    ImageSearch, FoundX, FoundY, 1220, 710, 1330, 790, C:\wasd\a.png
    if ErrorLevel = 0 
       { sleep, 50
       SendInput, {sc1E}
        BlockInput, Default
       }
    else ErrorLevel = 1
       { goto, Label4 
       }
    Label4:

Одна из картинок:
https://forum.script-coding.com/misc.php?action=pun_attachment&item=2310&download=1&secure_str=42970f27

Post's attachments

a.png
a.png 989 b, 3 downloads since 2023-01-15 

You don't have the permssions to download the attachments of this post.

2 (изменено: Madmer, 2023-01-19 04:15:11)

Re: AHK: ImageSearch не реагирует

Andreyka


Label2:
    sleep 50
    ImageSearch, FoundX, FoundY, 1220, 710, 1330, 790, *2 C:\wasd\w.png
    if (ErrorLevel = 0) 
    {  
        sleep, 50
        SendInput, {sc11}
        BlockInput, Default
    }
    else if (ErrorLevel = 1)
			{
				goto, Label3 
    		}
Label3:
    sleep, 50
    ImageSearch, FoundX, FoundY, 1220, 710, 1330, 790, *2 C:\wasd\a.png
    if (ErrorLevel = 0)
    {
		sleep, 50
        SendInput, {sc1E}
        BlockInput, Default
    }
    else if (ErrorLevel = 1)
			{
				goto, Label4 
			}
Label4: