<?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=9817&amp;type=atom" />
	<updated>2014-07-19T21:17:48Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=9817</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вычитание текстовых файлов]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84916#p84916" />
			<content type="html"><![CDATA[<p>Если нет никаких других знаков, кроме цифр и знаков абзаца, и если используется именно такой <a href="http://ru.wikipedia.org/wiki/%D0%97%D0%BD%D0%B0%D0%BA_%D0%B0%D0%B1%D0%B7%D0%B0%D1%86%D0%B0">знак абзаца (¶)</a>, тогда так:<br /></p><div class="codebox"><pre><code>FilePath1 := &quot;D:\Downloads\1.txt&quot;  ; указать истинные пути к файлам
FilePath2 := &quot;D:\Downloads\2.txt&quot;

SetBatchLines, -1
FileRead, Text1, % FilePath1
FileRead, Text2, % FilePath2
addText2 := &quot;¶&quot; . Text2 . &quot;¶&quot;

NewText1 := &quot;&quot;
Loop, parse, Text1, ¶
   NewText1 .= InStr(addText2, &quot;¶&quot; . A_LoopField . &quot;¶&quot;) ? &quot;&quot; : A_LoopField . &quot;¶&quot;
NewText1 := SubStr(NewText1, 1, -1)

FileDelete, % FilePath1
FileDelete, % FilePath2

FileAppend, % NewText1, % FilePath1
FileAppend, % Text2 . &quot;¶&quot; . NewText1, % FilePath2</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-07-19T21:17:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84916#p84916</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вычитание текстовых файлов]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84915#p84915" />
			<content type="html"><![CDATA[<p>Номера отбиты знаком абзаца. В номерах никаких знаков типа дефисов нет, только цифры.</p>]]></content>
			<author>
				<name><![CDATA[shut]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32433</uri>
			</author>
			<updated>2014-07-19T20:32:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84915#p84915</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вычитание текстовых файлов]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84914#p84914" />
			<content type="html"><![CDATA[<p>Разделителя может и не быть, например:</p><div class="codebox"><pre><code>23432егнен243 4324, гг444\5</code></pre></div><p>тут вопрос номера это телефонов в которых может быть или не быть + в начале или минус&nbsp; или пробел в середине. Если это целые числа, то их можно раскидать и без разделителя.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-07-19T19:58:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84914#p84914</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вычитание текстовых файлов]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84913#p84913" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Нужно знать, как отделяется в списках один номер от другого.</p></blockquote></div><p> думаю стандартно, т.е. через <em>&quot;,&quot;</em></p><br /><p><strong>shut</strong> пример бы текстовых файлов не помешал, а так то данные операции расписаны подробно в справке по языку - ищи по ключевому слову LOOP.</p>]]></content>
			<author>
				<name><![CDATA[Indomito]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27285</uri>
			</author>
			<updated>2014-07-19T19:17:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84913#p84913</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Вычитание текстовых файлов]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84911#p84911" />
			<content type="html"><![CDATA[<p>Нужно знать, как отделяется в списках один номер от другого.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-07-19T16:06:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84911#p84911</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Вычитание текстовых файлов]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=84909#p84909" />
			<content type="html"><![CDATA[<p>Здравствуйте.<br />Есть два текстовых файла со списками номеров. Задача удалить из первого все номера, что есть во втором, а во второй добавить все номера из первого которых там не было. Подскажите пожалуйста как это сделать. Заранее благодарен.</p>]]></content>
			<author>
				<name><![CDATA[shut]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32433</uri>
			</author>
			<updated>2014-07-19T15:16:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=84909#p84909</id>
		</entry>
</feed>
