<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK:Поиск 3 картинок в окне]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14862&amp;type=atom" />
	<updated>2019-07-20T09:51:21Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=14862</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Поиск 3 картинок в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=134971#p134971" />
			<content type="html"><![CDATA[<p>Так пойдет?</p><p>Суть проста, если находит изображение, то кликнет по координатам, а если нет, то ищет дальше до бесконечности.<br /><strong>F2 - Пауза.</strong></p><div class="codebox"><pre><code>
x1 := 1 ;Начало координаты для поиска на экране (Левый верхний угол)
y1 := 1 ;

x2 := 1366 ;Конец координаты для поиска на экране (Правый нижний угол - у меня)
y2 := 900 ;

loop {
n1x := 0
n1y := 0
ImageSearch, n1X, n1Y, %x1%, %y1%, %x2%, %y2%, 1.bmp ;Использовал именно bmp расширение изображения, потому что у меня
if n1x &gt; 0                                                                              ; это  работает быстрее чем PNG.
{
mouseclick, left, 916, 287
}
ImageSearch, n1X, n1Y, %x1%, %y1%, %x2%, %y2%, 2.bmp
if n1x &gt; 0
{
mouseclick, left, 916, 287
}
ImageSearch, n1X, n1Y, %x1%, %y1%, %x2%, %y2%, 3.bmp
if n1x &gt; 0
{
mouseclick, left, 916, 287
}
}
F2::pause
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[wladkokopops]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34240</uri>
			</author>
			<updated>2019-07-20T09:51:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=134971#p134971</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Поиск 3 картинок в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=134876#p134876" />
			<content type="html"><![CDATA[<p>В коде ошибки нет, хотя не учтен ErrorLevel = 2.<br />Проверяйте, действительно не находит или не посылает клик туда, куда надо.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2019-07-15T04:54:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=134876#p134876</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK:Поиск 3 картинок в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=134867#p134867" />
			<content type="html"><![CDATA[<p><span style="color: green"><strong>ildar12</strong>, приведите заголовок темы в соответствие с правилами. Проставьте заглавные буквы и точки предложениях.</span></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2019-07-14T08:27:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=134867#p134867</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK:Поиск 3 картинок в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=134864#p134864" />
			<content type="html"><![CDATA[<p>Всем привет, подскажите как найти картинки на экране, <br />есть 3 картинки, если находим любую из них, то кликаем по заданной координате. Нашел на форуме такой код, но не работает<br /></p><div class="codebox"><pre><code>1::
CoordMode Pixel
ImageSearch, FoundX, FoundY, 1100, 220, 1440, 400, *50 1.png
if ErrorLevel = 1
   goto try2
if ErrorLevel = 0
   Click, Left, 916, 287
return

try2:
CoordMode Pixel
ImageSearch, Found1X, Found1Y, 1100, 220, 1440, 400, *50 2.png
if ErrorLevel = 1
   goto try3
if ErrorLevel = 0
   Click, Left, 916, 287
return

try3:
CoordMode Pixel
ImageSearch, Found3X, Found3Y, 1100, 220, 1440, 400, *50 3.png
if ErrorLevel = 0
   Click, Left, 916, 287
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ildar12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40265</uri>
			</author>
			<updated>2019-07-13T19:24:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=134864#p134864</id>
		</entry>
</feed>
