<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; АНК: Добавить текст  в файл]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=5655</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=5655&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «АНК: Добавить текст  в файл».]]></description>
		<lastBuildDate>Fri, 24 Jun 2011 07:40:14 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: АНК: Добавить текст  в файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=49388#p49388</link>
			<description><![CDATA[<p>Еще раз спасибо, <strong>teadrinker</strong>!</p>]]></description>
			<author><![CDATA[null@example.com (Bobby)]]></author>
			<pubDate>Fri, 24 Jun 2011 07:40:14 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=49388#p49388</guid>
		</item>
		<item>
			<title><![CDATA[Re: АНК: Добавить текст  в файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=49322#p49322</link>
			<description><![CDATA[<p>Считываем текст из файла в переменную с помощью <em>FileRead</em>, проводим разбор, как в примере выше, создаём новый файл из полученного текста (<em>FileAppend</em>).</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Wed, 22 Jun 2011 17:38:50 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=49322#p49322</guid>
		</item>
		<item>
			<title><![CDATA[Re: АНК: Добавить текст  в файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=49306#p49306</link>
			<description><![CDATA[<p>Спасибо, <strong>teadrinker</strong>! Только хотелось бы удалять в текстовом файле.</p>]]></description>
			<author><![CDATA[null@example.com (Bobby)]]></author>
			<pubDate>Wed, 22 Jun 2011 10:12:20 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=49306#p49306</guid>
		</item>
		<item>
			<title><![CDATA[Re: АНК: Добавить текст  в файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=49305#p49305</link>
			<description><![CDATA[<div class="codebox"><pre><code>String =
(
Первая строка
Вторая строка
Третья строка
Четвертая строка
)

; удаляем строчку &quot;Третья строка&quot;
Loop, parse, String, `n, `r
   NewString1 .= A_LoopField = &quot;Третья строка&quot; ? &quot;&quot; : A_LoopField . &quot;`n&quot;
   
; удаляем последний перенос строки, если существует:
NewString1 := RegExReplace(NewString1, &quot;(.*)\R$&quot;, &quot;$1&quot;)  
MsgBox, % NewString1

; удаляем вторую строку
Loop, parse, String, `n, `r
   NewString2 .= A_Index = 2 ? &quot;&quot; : A_LoopField . &quot;`n&quot;
   
; удаляем последний перенос строки, если существует:
NewString2 := RegExReplace(NewString2, &quot;(.*)\R$&quot;, &quot;$1&quot;)  
MsgBox, % NewString2</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Wed, 22 Jun 2011 08:15:37 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=49305#p49305</guid>
		</item>
		<item>
			<title><![CDATA[Re: АНК: Добавить текст  в файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=49304#p49304</link>
			<description><![CDATA[<p>А как удалить определенную строку, т.е. строку с определенным текстом или номер строки?</p>]]></description>
			<author><![CDATA[null@example.com (Bobby)]]></author>
			<pubDate>Wed, 22 Jun 2011 06:34:02 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=49304#p49304</guid>
		</item>
		<item>
			<title><![CDATA[Re: АНК: Добавить текст  в файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=47131#p47131</link>
			<description><![CDATA[<p>Всё оказалось гораздо проще. <span class="bbu">Спасибо!</span> <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (Елена)]]></author>
			<pubDate>Tue, 29 Mar 2011 17:50:41 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=47131#p47131</guid>
		</item>
		<item>
			<title><![CDATA[Re: АНК: Добавить текст  в файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=47113#p47113</link>
			<description><![CDATA[<div class="codebox"><pre><code>Text =
(
Первая строка
Вторая строка
Третья строка
Четвёртая строка
Пятая строка
)

Sort, Text

MsgBox, %Text%</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (YMP)]]></author>
			<pubDate>Tue, 29 Mar 2011 14:52:25 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=47113#p47113</guid>
		</item>
		<item>
			<title><![CDATA[Re: АНК: Добавить текст  в файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=47112#p47112</link>
			<description><![CDATA[<p>Всплыл ещё один подводный камень.<br />Теперь необходимо получившийся файл .txt , Каждую строку отсортировать по&nbsp; алфавиту (строк может быть больше&nbsp; 100) длиною максимум 50 знаков<br />Догадываюсь ,что надо загнать его в переменную (FileRead)и через RegExReplace с ним что-то проделать.<br />Но не могу этого сделать.<br />ПОМОГИТЕ !!!</p>]]></description>
			<author><![CDATA[null@example.com (Елена)]]></author>
			<pubDate>Tue, 29 Mar 2011 14:21:45 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=47112#p47112</guid>
		</item>
		<item>
			<title><![CDATA[Re: АНК: Добавить текст  в файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46928#p46928</link>
			<description><![CDATA[<div class="codebox"><pre><code>File = D:\Temp\Stih.txt
Str1 = Я смотрю широкими глазами.
Str2 = В Персии такие ж точно куры,

Loop, Read, %File%
{
    If (PrevLine = Str1) and (A_LoopReadLine != Str1)
        Text .= Str2 . &quot;`n&quot;
    Text .= A_LoopReadLine . &quot;`n&quot;
    PrevLine := A_LoopReadLine
}

FileDelete, %File%
FileAppend, %Text%, %File%

MsgBox, Готово.</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (YMP)]]></author>
			<pubDate>Sat, 26 Mar 2011 15:00:44 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46928#p46928</guid>
		</item>
		<item>
			<title><![CDATA[Re: АНК: Добавить текст  в файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46926#p46926</link>
			<description><![CDATA[<p>Нет, предыдущую надо оставить как и все одинаковые и после неё дописать.</p>]]></description>
			<author><![CDATA[null@example.com (Елена)]]></author>
			<pubDate>Sat, 26 Mar 2011 14:23:53 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46926#p46926</guid>
		</item>
		<item>
			<title><![CDATA[Re: АНК: Добавить текст  в файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46919#p46919</link>
			<description><![CDATA[<p>Что значит &quot;выбрать последнюю строку&quot;? Предыдущие убрать или оставить?</p>]]></description>
			<author><![CDATA[null@example.com (YMP)]]></author>
			<pubDate>Sat, 26 Mar 2011 09:16:18 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46919#p46919</guid>
		</item>
		<item>
			<title><![CDATA[Re: АНК: Добавить текст  в файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46918#p46918</link>
			<description><![CDATA[<p>Это последняя ситуация какая может быть</p>]]></description>
			<author><![CDATA[null@example.com (Елена)]]></author>
			<pubDate>Sat, 26 Mar 2011 09:10:12 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46918#p46918</guid>
		</item>
		<item>
			<title><![CDATA[Re: АНК: Добавить текст  в файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46917#p46917</link>
			<description><![CDATA[<p>Странная какая-то ситуация. Какой во всём этом смысл? И какие ещё бывают ситуации? Просто неохота зря код писать.</p>]]></description>
			<author><![CDATA[null@example.com (YMP)]]></author>
			<pubDate>Sat, 26 Mar 2011 09:08:39 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46917#p46917</guid>
		</item>
		<item>
			<title><![CDATA[Re: АНК: Добавить текст  в файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46913#p46913</link>
			<description><![CDATA[<p>Ещё раз спасибо &quot;YMP&quot; всё работает , но бывает такая ситуация, когда строка повторяется несколько раз(Я смотрю широкими глазами.), и надо выбрать последнюю&nbsp; строку(Я смотрю широкими глазами.) и после неё добавить строчку - <em>В Персии такие ж точно куры,</em> т.е 6 стр</p><p><em>Тихий ветер. Вечер сине-хмурый.<br />Я смотрю широкими глазами.<br />Я смотрю широкими глазами.<br />Я смотрю широкими глазами.<br />Я смотрю широкими глазами.<br />Как у нас в соломенной Рязани.</em></p>]]></description>
			<author><![CDATA[null@example.com (Елена)]]></author>
			<pubDate>Sat, 26 Mar 2011 08:30:22 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46913#p46913</guid>
		</item>
		<item>
			<title><![CDATA[Re: АНК: Добавить текст  в файл]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46912#p46912</link>
			<description><![CDATA[<div class="codebox"><pre><code>File = D:\Temp\Stih.txt
Str = В Персии такие ж точно куры,

Loop, Read, %File%
{
    If A_Index = 3
        Text .= Str . &quot;`n&quot;
    Text .= A_LoopReadLine . &quot;`n&quot;
}

FileDelete, %File%
FileAppend, %Text%, %File%

MsgBox, Готово.</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (YMP)]]></author>
			<pubDate>Sat, 26 Mar 2011 08:16:09 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46912#p46912</guid>
		</item>
	</channel>
</rss>
