<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; АНК:регулярные выражения]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14215&amp;type=atom" />
	<updated>2018-10-10T16:49:37Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=14215</id>
		<entry>
			<title type="html"><![CDATA[Re: АНК:регулярные выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129146#p129146" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong></p><div class="codebox"><pre><code>Loop, parse, clipboard, `n, `r 
{ MsgBox, 4, , Файл номер %A_Index%: %A_LoopField%.`n`nПродолжить? 
IfMsgBox, No, break
 }</code></pre></div><p>Этот скрипт перебирает каждую строку.<br />Мне нужно что-бы он каждую строку загнал в переменную, а не перебирал.<br /></p><div class="codebox"><pre><code>MsgBox,
VarA= &quot;первая строка&quot;
VarB= &quot;вторая строка&quot;
VarС= &quot;третья строка&quot;</code></pre></div><p>Так-же можно сделать ?</p>]]></content>
			<author>
				<name><![CDATA[Елена]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24632</uri>
			</author>
			<updated>2018-10-10T16:49:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129146#p129146</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АНК:регулярные выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129126#p129126" />
			<content type="html"><![CDATA[<p>Непонятно, почему всё это обсуждается в теме под названием «Регулярные выражения». <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-10-09T16:56:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129126#p129126</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АНК:регулярные выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129124#p129124" />
			<content type="html"><![CDATA[<p>С ComObj не сталкивался, не подскажу.<br />В программировании переменной присваивается значение (целое число, число с точкой, строка), а не наоборот.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2018-10-09T15:35:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129124#p129124</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АНК:регулярные выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129113#p129113" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>a := &quot;строка&quot;
msgbox % a</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-10-08T19:52:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129113#p129113</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АНК:регулярные выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129108#p129108" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong><br />Непонятно как каждой строке присвоить переменную.</p>]]></content>
			<author>
				<name><![CDATA[Елена]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24632</uri>
			</author>
			<updated>2018-10-08T17:38:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129108#p129108</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АНК:регулярные выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129093#p129093" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Нашла вот это. Но надо немного переделать. Подскажите как.<br />КОД: Копировать Выделить всё</p><p>Loop, parse, clipboard, `n, `r<br />{<br />&nbsp; &nbsp; MsgBox, 4, , Строка номер %A_Index%: %A_LoopField%.`n`nПродолжить?<br />&nbsp; &nbsp; IfMsgBox, No, break<br />}</p></blockquote></div><p>А что именно вам в этом коде не понятно?</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-10-08T08:32:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129093#p129093</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АНК:регулярные выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129084#p129084" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong><br />1.Запускаем наш скрипт . Он смотрит что в буфере обмена.(там может быть и 7 небольших строк). Но если в первой строке не 14 знаков - завершаем скрипт.(Сообщение пользователю: &quot;Содержимое буфера не отвечает заданному шаблону&quot;)<br />2.Та строка , (она первая)где 14 знаков разбиваем на отдельные символы от VarA1 до VarA14 , я их хочу вставить в exel<br /></p><div class="codebox"><pre><code>Xl := ComObjActive(&quot;Excel.Application&quot;)
Xl.Range(&quot;B11&quot;).Value := &quot;%VarA1%&quot; 
Xl.Range(&quot;B12&quot;).Value := &quot;%VarA2%</code></pre></div><p>итд<br />3.Вторую строку&nbsp; поместить в переменную VarB<br />&nbsp; Третью&nbsp; строку&nbsp; поместить в переменную VarС<br />&nbsp; Четвертую&nbsp; строку&nbsp; поместить в переменную VarD<br />&nbsp; Пятую строку&nbsp; поместить в переменную VarЕ<br />&nbsp; Эти строки тоже будут вставляться в Exel.<br />&nbsp; Будут ли переменные называться В,С,D или E&nbsp; неважно. Главное что-бы я их могла вставить в Exel.</p>]]></content>
			<author>
				<name><![CDATA[Елена]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24632</uri>
			</author>
			<updated>2018-10-07T10:42:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129084#p129084</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АНК:регулярные выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129082#p129082" />
			<content type="html"><![CDATA[<p>Давайте пошагово.</p><p>1. Помещаем что-то в буфер, например<br /></p><div class="codebox"><pre><code>КЕ4978Р3658905
л547енва4645
17Ев567856рап556565 </code></pre></div><p>2. Запускаем наш скрипт. Он смотрит что есть в буфере. Если содержимое буфера отвечает шаблону<br />{ц<strong>ы</strong>фры или латински буквы 14 штук}{один перенос строки}{ц<strong>ы</strong>фры и русские буквы сколько угодно}{один перенос строки}{ц<strong>ы</strong>фры или латинские буквы сколько угодно}<br />то переходим к п. 3<br />иначе переходим к п. 4</p><p>3.<br />3.1 Разбить содержимое первого подшаблона на отдельные символы и поместить их в переменные VarA1 ... VarA14<br />3.2 Содержимое второго подшаблона поместить в переменную VarB<br />3.3 Содержимое третьего подшаблона поместить в переменную VarС</p><p>4. Сообщение пользователю: &quot;Содержимое буфера не отвечает заданному шаблону&quot;</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2018-10-07T10:26:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129082#p129082</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АНК:регулярные выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129080#p129080" />
			<content type="html"><![CDATA[<p><strong>sergeiplugatyr</strong><br />Мне надо:Как только я поместила 3 строки в буфер и нажала к примеру F11 <br /> эти три строчки имели вид <br /></p><div class="codebox"><pre><code>MsgBox,VarA = КЕ4978Р3658905
VarB = л547енва4645    
VarC = 17Ев567856рап556565  </code></pre></div><p>Нашла вот это. Но надо немного переделать. Подскажите как.<br /></p><div class="codebox"><pre><code>Loop, parse, clipboard, `n, `r
{
    MsgBox, 4, , Строка номер %A_Index%: %A_LoopField%.`n`nПродолжить?
    IfMsgBox, No, break
} </code></pre></div>]]></content>
			<author>
				<name><![CDATA[Елена]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24632</uri>
			</author>
			<updated>2018-10-07T08:39:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129080#p129080</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АНК:регулярные выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129075#p129075" />
			<content type="html"><![CDATA[<p><strong>Елена</strong>, для чего это делать? Если эти строки сразу на парсинг передаются в функцию. <br /></p><div class="codebox"><pre><code>/*
КЕ4978Р3658905
л547енва4645
17Ев567856рап556565
*/


MsgBox, % funcParseString()

funcParseString() {
	Clip := Clipboard
	Loop, parse, Clip, `n`r
	{
		if (StrLen(A_LoopField) == 14) {
			Loop, parse, A_LoopField
			{
				outVar .= &quot;VarA&quot; . A_Index . &quot; = &quot; A_LoopField &quot;`n&quot;
			} return outVar
		} else { 
		
		}
	}
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[sergeiplugatyr]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30382</uri>
			</author>
			<updated>2018-10-06T06:38:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129075#p129075</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АНК:регулярные выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129073#p129073" />
			<content type="html"><![CDATA[<p><strong>sergeiplugatyr</strong><br />Огромное спасибо.<br />Только как сделать, что-бы из буфера обмена эти 3 строки<br />КЕ4978Р3658905 <br />л547енва4645&nbsp; &nbsp; &nbsp;<br />17Ев567856рап556565&nbsp; </p><p>имели вид:<br /></p><div class="codebox"><pre><code>VarA=КЕ4978Р3658905
VarB=л547енва4645
VarC=17Ев567856рап556565</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Елена]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24632</uri>
			</author>
			<updated>2018-10-06T05:09:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129073#p129073</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АНК:регулярные выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129072#p129072" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>VarA=КЕ4978Р3658905
VarB=л547енва4645
VarC=17Ев567856рап556565

MsgBox, % funcParseString(VarA)

funcParseString(v) {
	if (StrLen(v) == 14) {
		Loop, parse, v
		{
			outVar .= &quot;VarA&quot; . A_Index . &quot; = &quot; A_LoopField &quot;`n&quot;
		} return outVar
	} else {
		return
}
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[sergeiplugatyr]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30382</uri>
			</author>
			<updated>2018-10-06T04:29:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129072#p129072</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АНК:регулярные выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129061#p129061" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Елена пишет:</cite><blockquote><p>Времени совсем нет на&nbsp; изучение.</p></blockquote></div><p>Тогда вам в этот раздел:<br /><a href="http://forum.script-coding.com/viewforum.php?id=28">http://forum.script-coding.com/viewforum.php?id=28</a></p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-10-05T19:02:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129061#p129061</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АНК:регулярные выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129060#p129060" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong><br />На форуме не первый день но не заходила сюда&nbsp; пару лет , так как не было надобности. Вот и прошу что-бы кто нибудь помог с написанием скрипта. Который сильно облегчит мою работу. Времени совсем нет на&nbsp; изучение.</p>]]></content>
			<author>
				<name><![CDATA[Елена]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24632</uri>
			</author>
			<updated>2018-10-05T18:59:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129060#p129060</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АНК:регулярные выражения]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129059#p129059" />
			<content type="html"><![CDATA[<p><strong>YMP</strong><br />Три строки как я написала.<br />Если не 14 знаков - Return</p>]]></content>
			<author>
				<name><![CDATA[Елена]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24632</uri>
			</author>
			<updated>2018-10-05T18:56:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129059#p129059</id>
		</entry>
</feed>
