<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Помогите преодолеть парадокс "Sleep" в связке с "SetTimer"]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10027&amp;type=atom" />
	<updated>2014-10-06T21:10:44Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10027</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Помогите преодолеть парадокс "Sleep" в связке с "SetTimer"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87064#p87064" />
			<content type="html"><![CDATA[<p>Думаю, всегда.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-10-06T21:10:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87064#p87064</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Помогите преодолеть парадокс "Sleep" в связке с "SetTimer"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87062#p87062" />
			<content type="html"><![CDATA[<p>Спасибо - то что надо! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p><p>Не знал что возможно такое двое чтение.. </p><div class="codebox"><pre><code>if Ench1 := !Ench1</code></pre></div><p>Это всегда так было, или в обновленной версии AHK?</p>]]></content>
			<author>
				<name><![CDATA[migomigo]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24684</uri>
			</author>
			<updated>2014-10-06T20:30:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87062#p87062</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Помогите преодолеть парадокс "Sleep" в связке с "SetTimer"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87054#p87054" />
			<content type="html"><![CDATA[<p>Наверно, так:<br /></p><div class="codebox"><pre><code>2::
   if Ench1 := !Ench1
   {
      SetTimer, Ench, 6000
      gosub, Ench
   }
   else
      SetTimer, Ench, Off
   Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-10-06T18:25:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87054#p87054</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Помогите преодолеть парадокс "Sleep" в связке с "SetTimer"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87053#p87053" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>migomigo пишет:</cite><blockquote><p>По сути эта часть кода элементарный Ключатель \ Выключатель. Но в данном исполнении перестает выключатся.</p></blockquote></div><p>Кто-нибудь понял? <span class="postimg"><img src="http://i.smiles2k.net/aiwan_smiles/no.gif" alt="http://i.smiles2k.net/aiwan_smiles/no.gif" /></span></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-10-06T18:18:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87053#p87053</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Помогите преодолеть парадокс "Sleep" в связке с "SetTimer"]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=87051#p87051" />
			<content type="html"><![CDATA[<p>По сути эта часть кода элементарный Ключатель \ Выключатель. Но в данном исполнении перестает выключатся.<br />Кто посоветует как его грамотно написать что бы он выключался?</p><p>Зарание спасибо. </p><div class="codebox"><pre><code>
^esc::
ExitApp

2::
Ench1 := !Ench1
If (!Ench1) {
    SetTimer, Ench, Off
}
SetTimer, Ench, 6000
gosub, Ench
Return

Ench:
MyLib_ToolTip(&quot;1&quot;)
Sleep, 1250
MyLib_ToolTip(&quot;2&quot;)
Sleep, 200
MyLib_ToolTip(&quot;3&quot;)
Sleep, 750
MyLib_ToolTip(&quot;4&quot;)
sleep, 150
MyLib_ToolTip(&quot;5&quot;)
sleep, 150
MyLib_ToolTip(&quot;6&quot;)
Sleep, 150
MyLib_ToolTip(&quot;7&quot;)
sleep, 200
MyLib_ToolTip(&quot;8&quot;)
sleep, 2750
return


;=================================================================================
;==========================  [Сюда не смотрите ] =================================
;=================================================================================


MyLib_ToolTip(TipText, TipDelay = 2000, TipX = 0, TipY = 0)
{
    If (!TipX) || (!TipY) {
        ToolTip, % TipText
        SetTimer, TtOff, % TipDelay
    }
    Else {
        ToolTip, % TipText, TipX, TipY
        SetTimer, TtOff, % TipDelay
    }
    Return
}

TtOff:
SetTimer, TtOff, Off
ToolTip
Return

</code></pre></div>]]></content>
			<author>
				<name><![CDATA[migomigo]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24684</uri>
			</author>
			<updated>2014-10-06T18:08:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=87051#p87051</id>
		</entry>
</feed>
