<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Команда ImageSearch]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=17894&amp;type=atom" />
	<updated>2023-07-30T18:34:59Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=17894</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Команда ImageSearch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=158922#p158922" />
			<content type="html"><![CDATA[<p>Попробовал протестировать ваш код, наверное я что-то не так делаю (Дай обезьяне инструмент, она ничего путного с ним не сделает, вот тут такая же ситуация <img src="//forum.script-coding.com/img/smilies/big_smile.png" width="15" height="15" /> ) , но ваш код навел меня на такую идею:<br /></p><div class="codebox"><pre><code>
Loop {
    ImageSearch, x, y, 0, 0, 1366, 768, C:\Users\admin\Desktop\Bot\img\1.png
    if (ErrorLevel = 0) {
		ImageSearch, x, y, 0, 0, 1366, 768, C:\Users\admin\Desktop\Bot\img\2.png
        	if (ErrorLevel = 0) {
				MsgBox, Найдено
     		}
     }
}
</code></pre></div><p>Не знаю насколько это юзабельно. И будет ли команда успевать считывать данные, потому что действия в игре происходят довольно быстро. Попробую</p>]]></content>
			<author>
				<name><![CDATA[mounks]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43270</uri>
			</author>
			<updated>2023-07-30T18:34:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=158922#p158922</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Команда ImageSearch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=158921#p158921" />
			<content type="html"><![CDATA[<p>Правильно. Можно так:<br /></p><div class="codebox"><pre><code>file1 := &quot;img1.png&quot;
file2 := &quot;img2.png&quot;

Loop {
    Loop 2 {
        ImageSearch, x, y, 0, 0, 1366, 768, % &quot;*TransGray *&quot; . TransMode . &quot; &quot; . file%A_Index%
        found := !ErrorLevel
        if !found {
            continue 2
        }
    }
    if found {
        MsgBox Найдено
    }
}</code></pre></div><p>Не забудьте указать CoordMode.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2023-07-30T17:50:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=158921#p158921</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Команда ImageSearch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=158920#p158920" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Так правильно?</p>]]></content>
			<author>
				<name><![CDATA[mounks]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43270</uri>
			</author>
			<updated>2023-07-30T16:46:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=158920#p158920</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Команда ImageSearch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=158919#p158919" />
			<content type="html"><![CDATA[<p><strong>mounks</strong>, добро пожаловать на форум! Ознакомьтесь, пожалуйста, с <a href="https://forum.script-coding.com/misc.php?action=rules">Правилами</a>, отредактируйте свой пост. Обратите внимание на оформление <a href="https://forum.script-coding.com/misc.php?action=rules#code-formatting">кода</a>.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2023-07-30T16:40:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=158919#p158919</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Команда ImageSearch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=158918#p158918" />
			<content type="html"><![CDATA[<p>Нужно написать небольшой скрипт через ImageSearch. Вопрос: Как совместить два запроса в исполнение одного действия по синтаксису AHK?<br />Пример использования одного запроса: <br /></p><div class="codebox"><pre><code>
Loop {
	ImageSearch, x, y, 0, 0, 1366, 768, *TransGray *%TransMode% %key%B.png
    if (ErrorLevel = 0)
    {
	MsgBox, Найдено
    }
}
</code></pre></div><p>Мне надо тоже самое, только чтобы сравнивалось две картинки, и если обе истинны, то выводится MsgBox. Если еще непонятно, то мне нужно понимание написания синтаксиса: <br />ImgSearch AND ImgSearch</p>]]></content>
			<author>
				<name><![CDATA[mounks]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43270</uri>
			</author>
			<updated>2023-07-30T16:36:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=158918#p158918</id>
		</entry>
</feed>
