<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Прибавить время, в текущее время, в переменной]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=14803</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14803&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Прибавить время, в текущее время, в переменной».]]></description>
		<lastBuildDate>Tue, 28 May 2019 19:08:08 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Прибавить время, в текущее время, в переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=134474#p134474</link>
			<description><![CDATA[<p>Хотя у <strong>teadrinker</strong> плюс в том, что при некорректной дате будет пустая строка, а в моём варианте будет текущее время.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Tue, 28 May 2019 19:08:08 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=134474#p134474</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Прибавить время, в текущее время, в переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=134470#p134470</link>
			<description><![CDATA[<p>На строчку длиннее, но без RegEx.<br /></p><div class="codebox"><pre><code>
Var1 = 01:59:01
time := &quot;19700101&quot; . StrReplace(Var1, &quot;:&quot;)
time += 59, s 
FormatTime, time, % time, hh:mm:ss
MsgBox, % time
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Tue, 28 May 2019 17:49:30 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=134470#p134470</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Прибавить время, в текущее время, в переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=134469#p134469</link>
			<description><![CDATA[<p>Через EnvAdd:<br /></p><div class="codebox"><pre><code>Var1 = 01:59:01
time := &quot;19700101&quot; . StrReplace(Var1, &quot;:&quot;)
time += 59, s
MsgBox, % newTime := RegExReplace(time, &quot;.*?(..(?=(....|..)$))&quot;, &quot;$1:&quot;)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Tue, 28 May 2019 14:15:07 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=134469#p134469</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Прибавить время, в текущее время, в переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=134466#p134466</link>
			<description><![CDATA[<div class="codebox"><pre><code>time := &quot;01:59:01&quot;
MsgBox % TimeFormat(SecFormat(time) + 59)

ExitApp
SecFormat(time_str) {
	t := StrSplit(time_str, &quot;:&quot;)
	return t[1] * 3600 + t[2] * 60 + t[3]
}
TimeFormat(time_sec) {
	return Format(&quot;{:02}:{:02}:{:02}&quot;   , (h := time_sec // 3600)
										, (m := (time_sec - h * 3600) // 60)
										, time_sec - (h * 3600 + m * 60))
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (KusochekDobra)]]></author>
			<pubDate>Tue, 28 May 2019 09:17:54 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=134466#p134466</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Прибавить время, в текущее время, в переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=134465#p134465</link>
			<description><![CDATA[<p><strong>stealzy</strong><br />уже вроде бы разобрался.<br />Я просто конвертировал часы, минуты в секунды, потом прибавляю нужное количество секунд и обратно конвертирую в часы:минуты:секунды.</p><div class="codebox"><pre><code>   RegExMatch(Var, &quot;^(..):(..):(..)$&quot;, t)
   HR := t1
   ME := t2
   SD := t3
   HR *= 60
   HR *= 60
   ME *= 60
   SD := HR + ME
SD += 2700</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Clannad5)]]></author>
			<pubDate>Tue, 28 May 2019 08:07:52 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=134465#p134465</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Прибавить время, в текущее время, в переменной]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=134463#p134463</link>
			<description><![CDATA[<p>Здравствуйте!</p><p>Имеется переменная, в данной переменой значение<br /></p><div class="codebox"><pre><code>Var1 = 01:59:01</code></pre></div><p>Соответственно это Час:Минута:Секунда<br />Как прибавить 59 секунд, чтобы получилось 02:00:00?</p><p>P.S Мне нужно, простой командой, прибавлять некоторое время, в текущее время.<br />Пробовал узнать про функцию envadd, но ничего не понял, т.к там есть только пример с текущей датой на моем пк, а если я допустим хочу из Log файла вытащить время и прибавить к нему, то нигде про это найти не смог.</p><p>Прошу помощи!</p>]]></description>
			<author><![CDATA[null@example.com (Clannad5)]]></author>
			<pubDate>Tue, 28 May 2019 02:18:46 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=134463#p134463</guid>
		</item>
	</channel>
</rss>
