<?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=15103</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=15103&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Операции со временем».]]></description>
		<lastBuildDate>Thu, 26 Dec 2019 23:07:24 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Операции со временем]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=137067#p137067</link>
			<description><![CDATA[<p>Можно и так.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 26 Dec 2019 23:07:24 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=137067#p137067</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Операции со временем]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=137066#p137066</link>
			<description><![CDATA[<p><strong>teadrinker</strong><br />А если не сложно можете объяснить пожалуйста как мне допустим значение которое получилось перевести в секунды, для последующей работы</p><p>Это костыльно или я в правильном направлении мыслю?<br /></p><div class="codebox"><pre><code>time = 02:44:29
RegExMatch(time, &quot;(.*):(.*):(.*)&quot;, Out)
sec := Out3 + (Out2 * 60) + (Out1 * 3600)
msgbox, %sec%</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Vaks_off)]]></author>
			<pubDate>Thu, 26 Dec 2019 21:47:38 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=137066#p137066</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Операции со временем]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=137065#p137065</link>
			<description><![CDATA[<p><strong>teadrinker</strong>, <strong>Спасибо!</strong></p><p>Может быть когда нибудь кому-то понадобится)<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>Gui Add, Button, vBut1 g1 x24 y64 w80 h23, &amp;OK
Gui Add, Button, g2 x24 y128 w80 h23, &amp;OK
Gui Add, Button, g3 x24 y192 w80 h23, &amp;OK
Gui Add, Text, vtime1 x16 y32 w96 h23 +0x200 +0x1, 0
Gui Add, Text, vtime2 x16 y96 w96 h23 +0x200 +0x1, 0
Gui Add, Text, vRazn x16 y160 w96 h23 +0x200 +0x1, 0


Gui Show, w126 h236, Window
FormatTime, TimeString, T12, Time

Return

1:
FormatTime, time1, t12, Time
GuiControl,,time1,%time1%
GuiControl, Disable, But1
Return

2:
FormatTime, time2, t12, Time
GuiControl,,time2,%time2%
return

3:
GuiControl,,Razn,% TimeDiff(time1, time2)
GuiControl, Enable, But1

Return

TimeDiff(time1, time2) {
   time1 := 16010101 . Format(&quot;{:02}{:02}{:02}&quot;, StrSplit(time1, &quot;:&quot;)*)
   time2 := 16010101 . Format(&quot;{:02}{:02}{:02}&quot;, StrSplit(time2, &quot;:&quot;)*)
   if (time2 &lt; time1)
      time2 += 1, d
   time2 -= time1, s
   time := 1601
   time += time2, s
   FormatTime, outTime, % time, HH:mm:ss
   Return outTime
}



GuiEscape:
GuiClose:
    ExitApp</code></pre></div></div></div>]]></description>
			<author><![CDATA[null@example.com (Vaks_off)]]></author>
			<pubDate>Thu, 26 Dec 2019 21:16:24 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=137065#p137065</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Операции со временем]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=137033#p137033</link>
			<description><![CDATA[<p>Пример:<br /></p><div class="codebox"><pre><code>time1 := &quot;5:42:24&quot;
time2 := &quot;23:30:17&quot;

MsgBox, % TimeDiff(time1, time2)

TimeDiff(time1, time2) {
   time1 := 16010101 . Format(&quot;{:02}{:02}{:02}&quot;, StrSplit(time1, &quot;:&quot;)*)
   time2 := 16010101 . Format(&quot;{:02}{:02}{:02}&quot;, StrSplit(time2, &quot;:&quot;)*)
   if (time2 &lt; time1)
      time2 += 1, d
   time2 -= time1, s
   time := 1601
   time += time2, s
   FormatTime, outTime, % time, HH:mm:ss
   Return outTime
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Wed, 25 Dec 2019 21:27:12 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=137033#p137033</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Операции со временем]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=136974#p136974</link>
			<description><![CDATA[<p>Переделал код, сейчас работает как нужно но как преобразовать это в формат HH:MI:SS<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>Gui Add, Button, g1 x24 y64 w80 h23, &amp;OK
Gui Add, Button, g2 x24 y128 w80 h23, &amp;OK
Gui Add, Button, g3 x24 y192 w80 h23, &amp;OK
Gui Add, Text, vTime x16 y32 w96 h23 +0x200 +0x1, 0
Gui Add, Text, vTime2 x16 y96 w96 h23 +0x200 +0x1, 0
Gui Add, Text, vRazn x16 y160 w96 h23 +0x200 +0x1, 0


Gui Show, w126 h236, Window
FormatTime, TimeString, T12, Time

Return

1:
TimeStart := A_Now
GuiControl,,Time,%TimeStart%
msgbox, %TimeStart%
Return

2:
TimeEnd := A_Now
GuiControl,,Time2,%TimeEnd%
msgbox, %TimeEnd%
return

3:
EnvSub, TimeEnd,%TimeStart%
GuiControl,,Razn,%TimeEnd%
MsgBox %TimeEnd% 
return</code></pre></div></div></div>]]></description>
			<author><![CDATA[null@example.com (Vaks_off)]]></author>
			<pubDate>Mon, 23 Dec 2019 08:32:37 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=136974#p136974</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Операции со временем]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=136968#p136968</link>
			<description><![CDATA[<p>Здравствуйте, подскажите пожалуйста как сделать вычитание времени<br />Я так понял через EnvSub но не могу разобраться как он работает.</p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>Gui Add, Button, g1 x24 y64 w80 h23, &amp;OK
Gui Add, Button, g2 x24 y128 w80 h23, &amp;OK
Gui Add, Button, g3 x24 y192 w80 h23, &amp;OK
Gui Add, Text, vTime x16 y32 w96 h23 +0x200 +0x1, 0
Gui Add, Text, vTime2 x16 y96 w96 h23 +0x200 +0x1, 0
Gui Add, Text, vRazn x16 y160 w96 h23 +0x200 +0x1, 0


Gui Show, w126 h236, Window
Return

1:
FormatTime, 1, t12, Time
msgbox, %1%
GuiControl,,Time,%1%
Return

2:
FormatTime, 2, t12, Time
msgbox, %2%
GuiControl,,Time2,%2%
return

3:
Razn := Time2 - Time
msgbox, %Razn%
return</code></pre></div></div></div>]]></description>
			<author><![CDATA[null@example.com (Vaks_off)]]></author>
			<pubDate>Mon, 23 Dec 2019 06:11:09 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=136968#p136968</guid>
		</item>
	</channel>
</rss>
