<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Удаление строки]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10867&amp;type=atom" />
	<updated>2015-08-14T15:27:35Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10867</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление строки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96449#p96449" />
			<content type="html"><![CDATA[<p>Ещё вариант:<br /></p><div class="codebox"><pre><code>FileEncoding, UTF-8
StringCaseSense, Locale
File = %A_ScriptDir%\File.txt

Loop, Read, %File%, %A_ScriptDir%\Temp.txt
    IfNotInString, A_LoopReadLine, авторизовался 
        FileAppend, %A_LoopReadLine%`n 
FileMove, %A_ScriptDir%\Temp.txt, %File%, 1</code></pre></div><p>или:<br /></p><div class="codebox"><pre><code>
FileName = %A_ScriptDir%\File.txt
FileEncoding, UTF-8
FileRead, Text, %FileName%
Text := RegExReplace(Text, &quot;m`ai)^.*авторизовался.*?(\R|$)&quot;)
FileDelete, %FileName%
FileAppend, %Text%, %FileName%
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-08-14T15:27:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96449#p96449</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление строки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96432#p96432" />
			<content type="html"><![CDATA[<p>Алгоритм может быть такой:<br />FileRead - читаем файл в переменную.<br />FileDelete - стираем файл.<br />Loop, Parse - Парсим&nbsp; переменную построчно.<br />&nbsp; &nbsp;If !instr - проверяем строку на присутствие нужного слова, если не находим, то добавляем эту строку в новую переменную.<br />&nbsp; &nbsp; &nbsp; NewVar .= A_LoopField &quot;`n&quot;<br />FileAppend&nbsp; - новую переменную сохраняем в файл.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-08-13T21:58:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96432#p96432</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Удаление строки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96431#p96431" />
			<content type="html"><![CDATA[<p><span style="color: green"><strong>sergeyols</strong>, ознакомьтесь с <a href="http://forum.script-coding.com/viewtopic.php?id=6148">этой</a> темой, отредактируйте заголовок.</span></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-08-13T21:54:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96431#p96431</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Удаление строки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96430#p96430" />
			<content type="html"><![CDATA[<p>Все просто, у меня есть текстовый документ. Нужно, чтобы из &quot;Loop, Read, file.txt&quot; удалялась строка в которой встретилось слово &quot;авторизовался&quot; и изменения сохранились в документе.</p>]]></content>
			<author>
				<name><![CDATA[sergeyols]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31692</uri>
			</author>
			<updated>2015-08-13T21:37:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96430#p96430</id>
		</entry>
</feed>
