<?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=15005&amp;type=atom" />
	<updated>2019-10-08T18:09:15Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=15005</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проверка переменной времени]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=136296#p136296" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong>, <strong>teadrinker</strong>, спасибо за помощь. Исправил код, теперь работает нормально.<br /></p><div class="codebox"><pre><code>
!1::
Loop
{
	Sleep, 10000
	if A_Min = 7
	{
		MsgBox, Удача!
		Sleep, 100000
	}
}
Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[anerevandrey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34113</uri>
			</author>
			<updated>2019-10-08T18:09:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=136296#p136296</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проверка переменной времени]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=136295#p136295" />
			<content type="html"><![CDATA[<p>Если вы думаете, что <em>Sleep, 100000</em> выполнится, только если <em>Timer1 = 13</em>, то это не так, эта строчка выполняется в каждой итерации цикла, поэтому и результата нет. Читайте <a href="https://www.autohotkey.com/docs/commands/Block.htm">здесь</a>.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2019-10-08T16:42:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=136295#p136295</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Проверка переменной времени]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=136294#p136294" />
			<content type="html"><![CDATA[<p>У Вас значение переменной Timer1 присваивается сразу после нажатия ГК. И далее, внутри цикла, значение этой переменной не изменяется. Лучше в цикле проверять значение переменной A_Min.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2019-10-08T16:42:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=136294#p136294</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Проверка переменной времени]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=136293#p136293" />
			<content type="html"><![CDATA[<p>Я хочу создать скрипт который выполняется циклично, каждый час, с одной и той же минуты. Я решил что самым простым для меня способом будет цикличиская проверка переменной A_Min, и сразу же в справочнике меня насторожило что A_Min это 2 цифры, я не смог разобратся как проверить эту переменную. Вот что я сделал, этот код не работает, но я оставлю чтобы было понятно. <br /></p><div class="codebox"><pre><code>
!1::
Timer1 := A_Min
Loop
{
	Sleep, 10000
	if Timer1 = 13
		MsgBox, Удача!
		Sleep, 100000
}
Return
</code></pre></div><p>Прошу помочь советом как такие переменные проверять. Благодарю!</p>]]></content>
			<author>
				<name><![CDATA[anerevandrey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34113</uri>
			</author>
			<updated>2019-10-08T16:17:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=136293#p136293</id>
		</entry>
</feed>
