<?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=13600&amp;type=atom" />
	<updated>2018-04-06T17:03:31Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13600</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Таймер с паузой.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124523#p124523" />
			<content type="html"><![CDATA[<p><strong>MandarinKa02</strong>, да в вашем скрипте всё прекрасно работает. Спасибо. И задержок <br />вроде-бы нету.</p>]]></content>
			<author>
				<name><![CDATA[danyalukashak]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38928</uri>
			</author>
			<updated>2018-04-06T17:03:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124523#p124523</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Таймер с паузой.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124522#p124522" />
			<content type="html"><![CDATA[<p><strong>stealzy</strong>, не совсем понял. В скрипте <strong>danyalukashak</strong>, действия по нажатию NumPad3 перебивают таймер. Я же сделал скрипт в котором такого не происходит.</p>]]></content>
			<author>
				<name><![CDATA[MandarinKa02]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34409</uri>
			</author>
			<updated>2018-04-06T16:31:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124522#p124522</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Таймер с паузой.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124518#p124518" />
			<content type="html"><![CDATA[<div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;timer</div><div class="fancy_spoiler"><div class="codebox"><pre><code>
#Persistent
main()
return


main() {
	global i:=0
	Timer(&quot;start&quot;)
}

Timer(func) {
	global i
	if(func=&quot;start&quot;) {
		SetTimer, _timer, 1000
	} else if(func=&quot;pause&quot;) {
		SetTimer, _timer, Off
	} else if(func=&quot;reset&quot;) {
		i:=0
		MsgBox, Время вышло
		SetTimer, _timer, Delete
	}
}



_tooltip:
{
	SetTimer, _tooltip,Delete
	Tooltip(&quot;hide&quot;)
	return
}

Tooltip(func) {
	global i
	if(func=&quot;Show&quot;) {
		tooltip % i
		SetTimer, _tooltip, 1000
	} else if(func=&quot;hide&quot;) {
		tooltip
	}
}

NumPad1::Timer(&quot;start&quot;)
NumPad2::Timer(&quot;pause&quot;)
NumPad3::Tooltip(&quot;show&quot;)
NumPad9::ExitApp
F5::Reload



_timer:
++i
if(i=15) { ;in sec
	Timer(&quot;reset&quot;)
} return
</code></pre></div></div></div>]]></content>
			<author>
				<name><![CDATA[MandarinKa02]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34409</uri>
			</author>
			<updated>2018-04-06T14:51:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124518#p124518</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Таймер с паузой.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124514#p124514" />
			<content type="html"><![CDATA[<p><strong>stealzy</strong>, имеется в виду, что таймер идёт и когда остаётся допустим 10 минут, то я могу поставить на паузу и отойти, а когда приду, убрать паузу и он продолжит работать с 10 минут. А есть обход задержки команд? Или нету?</p>]]></content>
			<author>
				<name><![CDATA[danyalukashak]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38928</uri>
			</author>
			<updated>2018-04-06T14:01:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124514#p124514</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Таймер с паузой.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124483#p124483" />
			<content type="html"><![CDATA[<p>Все верно, см. SetBatchLines. Даже если установить в -1, команды занимают некое время.<br />Я не очень понимаю, что значит &quot;таймер с паузой&quot;. Почему бы просто не отключать таймер, а потом включать снова?</p>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2018-04-05T17:33:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124483#p124483</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Таймер с паузой.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124473#p124473" />
			<content type="html"><![CDATA[<p><strong>stealzy</strong>, я поставил вместо 500 - 1000, что-бы было по секундам,но вроде-бы там время немного запаздывает. Нужно поставить 998? Или мне просто кажется, что оно опаздывает? Или когда я нажимаю NumPad3, то Action перестаёт на эту секунду работать?<br /></p><div class="codebox"><pre><code>NumPad1::SetTimer Action, -1
NumPad2::Pause
NumPad3::
  tooltip %i%
  sleep 1000 
  tooltip
return
NumPad9::ExitApp

Action:
  ++i
  Sleep 1000	
  if i&lt;7200
    SetTimer Action, -1
  if i=7200
   {
    MsgBox, Время вышло
    i:=0
   }
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[danyalukashak]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38928</uri>
			</author>
			<updated>2018-04-05T15:15:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124473#p124473</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Таймер с паузой.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124438#p124438" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>i := 0
F1::SetTimer Action, -1
F2::Pause
Esc::ExitApp

Action:
	ToolTip % ++i
	Sleep 500
	SetTimer Action, -1
Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2018-04-04T17:53:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124438#p124438</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Таймер с паузой.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124436#p124436" />
			<content type="html"><![CDATA[<p>Здравствуйте! Как можно сделать таймер с паузой? Через Sleep не получается, тогда может через loop? Я просто не уверен, что в loop всё будет правильно с таймингами. Заранее спасибо.</p>]]></content>
			<author>
				<name><![CDATA[danyalukashak]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38928</uri>
			</author>
			<updated>2018-04-04T13:31:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124436#p124436</id>
		</entry>
</feed>
