<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Посчитать выполнения]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=15682&amp;type=atom" />
	<updated>2021-05-10T06:07:09Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=15682</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Посчитать выполнения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147778#p147778" />
			<content type="html"><![CDATA[<p><strong>Wraith</strong>, закомментируйте, либо удалите строку со Sleep.</p>]]></content>
			<author>
				<name><![CDATA[KusochekDobra]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33846</uri>
			</author>
			<updated>2021-05-10T06:07:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147778#p147778</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Посчитать выполнения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147758#p147758" />
			<content type="html"><![CDATA[<p><span style="color: green"><strong>Wraith</strong>, исправлена только часть ошибок. Ещё раз внимательно проверьте Ваши сообщения.</span></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2021-05-09T06:54:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147758#p147758</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Посчитать выполнения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147757#p147757" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>KusochekDobra пишет:</cite><blockquote><div class="codebox"><pre><code>search_img := &quot;icon.bmp&quot;

F1::
Loop
{
	ImageSearch, X, Y, 190, 335, 1920, 1080,% search_img
	If (!ErrorLevel) {
		Click Left %X%, %Y%
		i += 1
		ToolTip, Выполнено %i%, 960,1010
	}
	While (!ErrorLevel) {
		Sleep, 100
		ImageSearch, X, Y, 190, 335, 1920, 1080,% search_img
	}
}
Return</code></pre></div></blockquote></div><p>Спасибо!!! Помогло.<br />Можно ли както без Sleep это сделать?</p>]]></content>
			<author>
				<name><![CDATA[Wraith]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40888</uri>
			</author>
			<updated>2021-05-09T01:02:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147757#p147757</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Посчитать выполнения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147745#p147745" />
			<content type="html"><![CDATA[<p><span style="color: green"><strong>Wraith</strong>, предложения должны заканчиваться знаками препинания. Смайлик точкой не считается.<br /><a href="http://forum.script-coding.com/viewtopic.php?pid=140039#p140039">http://forum.script-coding.com/viewtopi … 39#p140039</a></span><br /><span style="color: green"><a href="http://forum.script-coding.com/viewtopic.php?pid=140049#p140049">http://forum.script-coding.com/viewtopi … 49#p140049</a></span><br /><span style="color: green"><a href="http://forum.script-coding.com/viewtopic.php?pid=140206#p140206">http://forum.script-coding.com/viewtopi … 06#p140206</a></span><br /><span style="color: green"><a href="http://forum.script-coding.com/viewtopic.php?pid=143866#p143866">http://forum.script-coding.com/viewtopi … 66#p143866</a></span><br /><span style="color: green"><a href="http://forum.script-coding.com/viewtopic.php?pid=147743#p147743">http://forum.script-coding.com/viewtopi … 43#p147743</a><br />Исправьте!</span></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2021-05-08T06:40:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147745#p147745</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Посчитать выполнения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147744#p147744" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>search_img := &quot;icon.bmp&quot;

F1::
Loop
{
	ImageSearch, X, Y, 190, 335, 1920, 1080,% search_img
	If (!ErrorLevel) {
		Click Left %X%, %Y%
		i += 1
		ToolTip, Выполнено %i%, 960,1010
	}
	While (!ErrorLevel) {
		Sleep, 100
		ImageSearch, X, Y, 190, 335, 1920, 1080,% search_img
	}
}
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[KusochekDobra]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33846</uri>
			</author>
			<updated>2021-05-08T06:29:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147744#p147744</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Посчитать выполнения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=147743#p147743" />
			<content type="html"><![CDATA[<p><strong>Botsy</strong> Нет, не помогло, теперь считает бесконечно, не останавливаясь.</p><p>Вернулся к этой же проблеме и добрался до этой темы, с этим счетчиком будет гораздо удобней.</p><p>Это происходит изза того что картинка остается на экране еще несколько миллисекунд, поэтому прибавляется не по 1, а по 3-5 и т д, но мне нужно чтобы прибавлялось только +1.<br />Может можно сделать както, чтобы принудительно прибавлялось только +1 и не больше.</p><p>Сколько искал в интернете и на этом форуме так решения и не нашел. Кучу разных решений пробовал ничего не помогло. Если убрать Loop, то считает нормально, но это вообще не вариант.</p><div class="codebox"><pre><code>F1::
Loop
{
	ImageSearch, X, Y, 190, 335, 1920, 1080, icon.bmp
	If ErrorLevel = 0
	{
	Click Left %X%, %Y%
	i += 1
	ToolTip, Выполнено %i%, 960,1010
	}
}
Return</code></pre></div><p>Пожалуйста помогите упростить жизнь <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Wraith]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40888</uri>
			</author>
			<updated>2021-05-08T05:26:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=147743#p147743</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Посчитать выполнения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=144182#p144182" />
			<content type="html"><![CDATA[<p><strong>Wraith</strong> Может так? Нет возможности проверить. <br /></p><div class="codebox"><pre><code>
F1::

errlvl_0_1 := &quot;&quot;
errlvl_1_1 := &quot;&quot;

Loop
{
	ImageSearch, X, Y, 0, 0, 1920, 1080, icon.bmp
	If ErrorLevel = 0
	{
		errlvl_0_1 := 0
		Click Left 960, 540
	}
	else
	{
		errlvl_1_1 := 1
		if (errlvl_1_1 == 1 &amp;&amp; errlvl_0_1 == 0) 
		{
		Count += 1
		tooltip, Выполнено icon %Count%
		}
	}
	
	ImageSearch, X, Y, 0, 0, 1920, 1080, icon2.bmp
	If ErrorLevel = 0
	{
		errlvl_0_1 := 1
		Click Left 970, 550
	}
	else
	{
		errlvl_1_1 := 0
		if (errlvl_1_1 == 0 &amp;&amp; errlvl_0_1 == 1) 
		{
		Count_Second += 1
		tooltip, Выполнено icon %Count_Second%
		}
	}
}
Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Botsy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=41069</uri>
			</author>
			<updated>2020-12-14T08:03:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=144182#p144182</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Посчитать выполнения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=144181#p144181" />
			<content type="html"><![CDATA[<p>Никто не знает как это сделать?)</p>]]></content>
			<author>
				<name><![CDATA[Wraith]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40888</uri>
			</author>
			<updated>2020-12-14T05:27:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=144181#p144181</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Посчитать выполнения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=142238#p142238" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong><br />Мне нужен подсчет +1, после выполненных кликов.<br />То есть иконка нашлась, затем выполнились клики, после выполненных кликов иконка пропадает с экрана, должно прибавиться +1, после, возможно появится следующая иконка и все так же повторяется.</p><p>Если сделать так, то будет бесконечно прибавляться.<br /></p><div class="codebox"><pre><code>
If ErrorLevel = 1
{
i++
ToolTip, %i%
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Wraith]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40888</uri>
			</author>
			<updated>2020-09-21T16:19:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=142238#p142238</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Посчитать выполнения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=142236#p142236" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>чтобы после того как пропала иконка</p></blockquote></div><div class="codebox"><pre><code>If ErrorLevel = 1</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2020-09-21T15:31:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=142236#p142236</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Посчитать выполнения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=142235#p142235" />
			<content type="html"><![CDATA[<p>Хочу сделать кликер. Есть две иконки, по которым нужно кликать, мне нужно, чтобы после того как пропала иконка, клики прекратились и прибавилось +1 к &quot;Выполнено&quot;, мне нужно знать сколько раз выполнено. Вообще не понимаю как это сделать..<br />У меня есть код, но он считает количество кликов <img src="//forum.script-coding.com/img/smilies/sad.png" width="15" height="15" /><br /></p><div class="codebox"><pre><code>F1::
Loop
{
	ImageSearch, X, Y, 0, 0, 1920, 1080, icon.bmp
	If ErrorLevel = 0
	{
		Click Left 960, 540
		i++
		ToolTip, Выполнено %i%, 960,1010
	}
	ImageSearch, X, Y, 0, 0, 1920, 1080, icon2.bmp
	If ErrorLevel = 0
	{
		Click Left 970, 550
		i++
		ToolTip, Выполнено %i%, 960,1010
	}
}
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Wraith]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40888</uri>
			</author>
			<updated>2020-09-20T18:58:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=142235#p142235</id>
		</entry>
</feed>
