<?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=6346</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=6346&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Копирование из файла две строки по найденному слову».]]></description>
		<lastBuildDate>Fri, 21 Oct 2011 20:26:05 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Копирование из файла две строки по найденному слову]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=52789#p52789</link>
			<description><![CDATA[<div class="codebox"><pre><code>Loop, read, 1_List.txt ; чтение файла
    {
    IfInString, A_LoopReadLine, СЛОВО_ ; если искомое нашлось...
        {
        LineA := A_LoopReadLine ; присваиваем строку в переменную
        FileReadLine, LineB, 1_List.txt, % A_Index + 1 ; считываем следущюю строку 
        Break ; выход из цикла
        }
    }
FileAppend, %LineA%`n%LineB%, 2_List.txt ;</code></pre></div><p>Это сильно!<br /></p><div class="codebox"><pre><code>MsgBox, % RegExReplace(Text, &quot;sm`aU).*(^[^\n\r]*СЛОВО_.*\R.*)\R.*?&quot;, &quot;$1&quot;)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Zohann)]]></author>
			<pubDate>Fri, 21 Oct 2011 20:26:05 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=52789#p52789</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Копирование из файла две строки по найденному слову]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=52765#p52765</link>
			<description><![CDATA[<div class="codebox"><pre><code>Text =
(
текст текст текст текст
текст текст текст СЛОВО_ текст текст текст
Любой текст Любой текст
текст текст текст текст
)

MsgBox, % RegExReplace(Text, &quot;sm`aU).*(^[^\n\r]*СЛОВО_.*\R.*)\R.*?&quot;, &quot;$1&quot;)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Fri, 21 Oct 2011 07:52:15 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=52765#p52765</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Копирование из файла две строки по найденному слову]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=52758#p52758</link>
			<description><![CDATA[<p>Это я все понимаю... но как это в коде отобразить...&nbsp; я как только не пытался...не получается...</p>]]></description>
			<author><![CDATA[null@example.com (VlaDOS)]]></author>
			<pubDate>Fri, 21 Oct 2011 05:29:38 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=52758#p52758</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Копирование из файла две строки по найденному слову]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=52757#p52757</link>
			<description><![CDATA[<p>Присвоить строку в переменную text<br />Запомнить A_Index<br />Выйти из цикла чтения<br />Считать строку A_Index+1</p>]]></description>
			<author><![CDATA[null@example.com (Zohann)]]></author>
			<pubDate>Fri, 21 Oct 2011 05:23:03 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=52757#p52757</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Копирование из файла две строки по найденному слову]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=52754#p52754</link>
			<description><![CDATA[<p>Проблема,&nbsp; не могу понять как при нахождении слова в тексте (файл) скопировать всю строку (в другой файл) с копированием следующей строки (идущей ниже). <img src="//forum.script-coding.com/img/smilies/sad.png" width="15" height="15" /><br />Как скопировать строку я понял с нужным словом, я не пойму как мне сделать так чтобы можно было копировать строку с найденным словом и следующей идущей за не (ниже) строкой.<br /></p><div class="codebox"><pre><code>Loop, read, 1_List.txt, 2_List.txt

{
    IfInString, A_LoopReadLine, СЛОВО_ , FileAppend, %A_LoopReadLine% `n 

}</code></pre></div><p><strong><br />Данный код работает по тексту</strong>: <br /><em>текст текст текст текст<br />текст текст текст <strong>СЛОВО_</strong> текст текст текст<br />Любой текст Любой текст<br />текст текст текст текст</em></p><p><strong>Результат:</strong><br />Скопировано в файл 2_List.txt: <em> текст текст текст <strong>СЛОВО_</strong> текст текст текст </em><br /><strong><br />А мне нужно:</strong><br /><em> текст текст текст <strong>СЛОВО_</strong> текст текст текст<br />Любой текст Любой текст</em></p><p>Помогите пожалуйста.</p>]]></description>
			<author><![CDATA[null@example.com (VlaDOS)]]></author>
			<pubDate>Fri, 21 Oct 2011 03:46:54 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=52754#p52754</guid>
		</item>
	</channel>
</rss>
