<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Деление значения на "строки", аля Fetch]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10931&amp;type=atom" />
	<updated>2015-10-12T07:56:59Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10931</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Деление значения на "строки", аля Fetch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97969#p97969" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>adddays := 3
indate := &quot;*** Did your best friend try the Kleptomania? *** 08.10.2015 *** Did your best friend try the Kleptomania? ***&quot;

If !RegExMatch(indate, &quot;(?P&lt;me&gt;\d{2}\.\d{2}\.\d{4})&quot;, ti) {
    MsgBox В переменной &quot;indate&quot; не содержится подстрока со временем вида dd.MM.yyyy
    Return
}
; MsgBox % time
outdate := (_:=StrSplit(time,&quot;.&quot;))[3] _[2] _[1]
outdate += adddays, days
FormatTime, DayOfWeek, %outdate%, ddd
MsgBox % DayOfWeek
outdate += DayOfWeek=&quot;Вс&quot;, days
FormatTime, outdate, %outdate%, dd.MM.yyyy
MsgBox % outdate</code></pre></div><p>Скорее всего, отображение дня недели (Вс, Пн и т.д.) зависит от установленного языка системы, то есть в общем случае нужно еще добавить проверки.</p>]]></content>
			<author>
				<name><![CDATA[Irbis]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27384</uri>
			</author>
			<updated>2015-10-12T07:56:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97969#p97969</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Деление значения на "строки", аля Fetch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97968#p97968" />
			<content type="html"><![CDATA[<p>А подскажите еще один маленький нюанс, каким образом сделать проверку outdate - если попадает на воскресенье то + 1 день?</p>]]></content>
			<author>
				<name><![CDATA[Seva]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33325</uri>
			</author>
			<updated>2015-10-12T07:05:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97968#p97968</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Деление значения на "строки", аля Fetch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97270#p97270" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Вот сейчас очень сильно удивили, а предложенный мною код не катит?</p></blockquote></div><p>Спасибо, катит <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /> Просто пока разбирался с синтаксисом... Не успел попробовать <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /> Еще раз спасибо!</p>]]></content>
			<author>
				<name><![CDATA[Seva]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33325</uri>
			</author>
			<updated>2015-09-09T15:50:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97270#p97270</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Деление значения на "строки", аля Fetch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97269#p97269" />
			<content type="html"><![CDATA[<p>Вот сейчас очень сильно удивили, а предложенный мною код не катит?<br /></p><div class="codebox"><pre><code>adddays := 3
indate := &quot;*** Did your best friend try the Kleptomania? *** 21.07.2014 *** Did your best friend try the Kleptomania? ***&quot;

If !RegExMatch(indate, &quot;(?P&lt;me&gt;\d{2}\.\d{2}\.\d{4})&quot;, ti) {
    MsgBox В переменной &quot;indate&quot; не содержится подстрока со временем вида dd.MM.yyyy
    Return
}
MsgBox % time
outdate := (_:=StrSplit(time,&quot;.&quot;))[3] _[2] _[1] 
outdate += adddays, days
FormatTime, outdate, %outdate%, dd.MM.yyyy
MsgBox % outdate</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-09-09T15:44:53Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97269#p97269</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Деление значения на "строки", аля Fetch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97268#p97268" />
			<content type="html"><![CDATA[<p>А можно ли удалить из буфера ВСЕ, кроме \d{2}\.\d{2}\.\d{4}&nbsp; &nbsp;??</p>]]></content>
			<author>
				<name><![CDATA[Seva]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33325</uri>
			</author>
			<updated>2015-09-09T15:42:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97268#p97268</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Деление значения на "строки", аля Fetch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97267#p97267" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Да какие тут гарантии, если речь про распознаватель текста, мало ли что он ещё по краям понавесит.</p></blockquote></div><p>Иногда &quot;вешает&quot; Enter</p>]]></content>
			<author>
				<name><![CDATA[Seva]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33325</uri>
			</author>
			<updated>2015-09-09T15:40:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97267#p97267</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Деление значения на "строки", аля Fetch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97266#p97266" />
			<content type="html"><![CDATA[<p>Да какие тут гарантии, если речь про распознаватель текста, мало ли что он ещё по краям понавесит.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-09-09T15:39:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97266#p97266</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Деление значения на "строки", аля Fetch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97265#p97265" />
			<content type="html"><![CDATA[<p>Думаю, если хочется удостовериться в 100% правильности даты, то надо еще условий добавить:<br /></p><div class="codebox"><pre><code>adddays := 3
indate := &quot;*** Did your best friend try the Kleptomania? *** 121.25.2014e *** Did your best friend try the Kleptomania? ***&quot;

If !RegExMatch(indate, &quot;(?P&lt;me&gt;\d{2}\.\d{2}\.\d{4})&quot;, ti) {
    MsgBox В переменной &quot;indate&quot; не содержится подстрока со временем вида dd.MM.yyyy
    Return
}
outdate := (_:=StrSplit(time,&quot;.&quot;))[3] _[2] _[1] 
outdate += adddays, days
FormatTime, outdate, %outdate%, dd.MM.yyyy
MsgBox % outdate</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-09-09T15:34:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97265#p97265</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Деление значения на "строки", аля Fetch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97264#p97264" />
			<content type="html"><![CDATA[<p>Так время не проверить:<br /></p><div class="codebox"><pre><code>var := &quot;2й1.0ё7.20ы14 *** Did your best friend try the Kleptomania? ***&quot; 
msgbox % &quot;&quot;&quot;&quot; RegexReplace(var,&quot; ?\*\*\*.+?\*\*\* ?&quot;) &quot;&quot;&quot;&quot;</code></pre></div><p>Может как то так:<br /></p><div class="codebox"><pre><code>adddays := 3
indate := &quot;*** Did your best friend try the Kleptomania? *** 21.07.2014 *** Did your best friend try the Kleptomania? ***&quot;

If !RegExMatch(indate, &quot;(?P&lt;me&gt;\d{2}\.\d{2}\.\d{4})&quot;, ti) {
    MsgBox В переменной &quot;indate&quot; не содержится подстрока со временем вида dd.MM.yyyy
    Return
}
outdate := (_:=StrSplit(time,&quot;.&quot;))[3] _[2] _[1] 
outdate += adddays, days
FormatTime, outdate, %outdate%, dd.MM.yyyy
MsgBox % outdate</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-09-09T15:27:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97264#p97264</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Деление значения на "строки", аля Fetch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97262#p97262" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>var := &quot;21.07.2014&quot;
;var := &quot;21.07.2014 *** Did your best friend try the Kleptomania? ***&quot;
;var := &quot;*** Did your best friend try the Kleptomania? *** 21.07.2014&quot;
msgbox % &quot;&quot;&quot;&quot; RegexReplace(var,&quot; ?\*\*\*.+?\*\*\* ?&quot;) &quot;&quot;&quot;&quot;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-09-09T14:36:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97262#p97262</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Деление значения на "строки", аля Fetch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97261#p97261" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Drugoy пишет:</cite><blockquote><p>Да, используя IfInString/RegExMatch/RegExReplace.</p></blockquote></div><p>Спасибо, а на примере покажете? А то я &quot;чайник&quot; <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />*** Did your best friend try the Kleptomania? *** 21.07.2014<br />или<br />21.07.2014 *** Did your best friend try the Kleptomania? ***</p><p>Заранее спасибо.</p>]]></content>
			<author>
				<name><![CDATA[Seva]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33325</uri>
			</author>
			<updated>2015-09-09T13:44:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97261#p97261</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Деление значения на "строки", аля Fetch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97260#p97260" />
			<content type="html"><![CDATA[<p>Да, используя IfInString/RegExMatch/RegExReplace.</p>]]></content>
			<author>
				<name><![CDATA[Drugoy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27463</uri>
			</author>
			<updated>2015-09-09T12:24:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97260#p97260</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Деление значения на "строки", аля Fetch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97258#p97258" />
			<content type="html"><![CDATA[<p>Есть еще один небольшой вопрос: Программа Kleptomania после нескольких распознаваний текста загоняет в буфер всякую рекламу типа - *** Did your best friend try the Kleptomania? *** или *** Kleptomania FAQ is at http://www.structurise.com/kleptomania/faq.htm *** <strong>(методом научного тыка выяснил, что реклама добавляется или ДО или ПОСЛЕ данных, скопированных в буфер обмена)</strong><br />Можно ли как нибудь делать проверку на наличие ненужных символов (допустим ***) в буфере обмена и при наличии их обрезал содержимое буфера до даты, которая мне собственно и нужна?</p>]]></content>
			<author>
				<name><![CDATA[Seva]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33325</uri>
			</author>
			<updated>2015-09-09T10:48:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97258#p97258</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Деление значения на "строки", аля Fetch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97195#p97195" />
			<content type="html"><![CDATA[<p>Спасибо всем, разобрался.</p>]]></content>
			<author>
				<name><![CDATA[Seva]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33325</uri>
			</author>
			<updated>2015-09-07T17:58:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97195#p97195</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Деление значения на "строки", аля Fetch]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97194#p97194" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>\d{2}\.</code></pre></div><p>Цифры только две, дальше точка. \ экранирует спец символы. RegEx он и в AutoHotkey RegEx.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-09-07T17:58:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97194#p97194</id>
		</entry>
</feed>
