<?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=12431&amp;type=atom" />
	<updated>2017-02-12T13:24:39Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=12431</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Таймер в цикле]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=112269#p112269" />
			<content type="html"><![CDATA[<p>Если все таки надо в отдельном потоке:<br /></p><div class="codebox"><pre><code>F1::SetTimer,Timer,-1  ; Первая активация без задержки.
F2::SetTimer,Timer,off ; отключаем таймер

Timer:
	ToolTip Сработал таймер
	SetTimer,Timer,-30000 ; 30 сек... указываем что бы перейти на эту же метку через 30 сек(бесконечно)
	Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2017-02-12T13:24:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=112269#p112269</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Таймер в цикле]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=112266#p112266" />
			<content type="html"><![CDATA[<p><strong>belyankin12</strong> Уже сделал так, забыл отписаться. Спасибо.</p>]]></content>
			<author>
				<name><![CDATA[Drizzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34603</uri>
			</author>
			<updated>2017-02-12T13:21:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=112266#p112266</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Таймер в цикле]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=112264#p112264" />
			<content type="html"><![CDATA[<p>Если нужно цикл с паузой, не проще сделать:<br /></p><div class="codebox"><pre><code>
loop
{
sleep 30000
}</code></pre></div><p>?</p>]]></content>
			<author>
				<name><![CDATA[belyankin12]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34408</uri>
			</author>
			<updated>2017-02-12T13:13:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=112264#p112264</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Таймер в цикле]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=112258#p112258" />
			<content type="html"><![CDATA[<p>Добрый день, помогите разобраться с таймером для цикла. Имею следующий код:<br /></p><div class="codebox"><pre><code>
Space()
{
	StartLoop := A_TickCount , Tick := 30
	Loop
	{
		For k, v in Obj := SeveralSearch1(0, 0, 2000, 2000, 0x00006A) ;
		{
			MouseMove v[1], v[2]+120
			Sleep 100
			MouseClick, , v[1], v[2]+120, , 0	
		}	
	}
}
</code></pre></div><p>Суть в следующем, использовал поиск на форуме наткнулся на такой вид таймера. Мне нужно чтобы код в цикле выполнялся каждые 30 секунд, а он почему выполняется каждую секунду. Что не так?</p>]]></content>
			<author>
				<name><![CDATA[Drizzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34603</uri>
			</author>
			<updated>2017-02-12T12:49:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=112258#p112258</id>
		</entry>
</feed>
