<?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=10189&amp;type=atom" />
	<updated>2014-11-29T12:31:08Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10189</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск неповторяющихся строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=88782#p88782" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p><strong>avens</strong>, &quot;неповторяющихся&quot; в названии темы пишется слитно.</p></blockquote></div><p>Исправил <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[avens]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24487</uri>
			</author>
			<updated>2014-11-29T12:31:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=88782#p88782</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск неповторяющихся строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=88756#p88756" />
			<content type="html"><![CDATA[<p><strong>avens</strong>, &quot;неповторяющихся&quot; в названии темы пишется слитно.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2014-11-28T07:54:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=88756#p88756</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск неповторяющихся строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=88752#p88752" />
			<content type="html"><![CDATA[<p>Теперь понял. Возможно это правильно.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-11-28T05:27:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=88752#p88752</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск неповторяющихся строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=88743#p88743" />
			<content type="html"><![CDATA[<p>Он имеет в виду что<br /></p><div class="codebox"><pre><code>MsgBox, % InStr(&quot;222&quot;, &quot;22&quot;,,, 2)</code></pre></div><p>по аналогии.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-11-27T20:33:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=88743#p88743</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск неповторяющихся строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=88742#p88742" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>&quot;`n&quot; A_LoopField &quot;`n&quot;</code></pre></div><p>Не уверен, что Я тебя понял.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-11-27T20:29:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=88742#p88742</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск неповторяющихся строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=88738#p88738" />
			<content type="html"><![CDATA[<p>А по-моему правильно работает.<br />Если бы он в твоем примере находил 2 раза линию из двоек, то тогда логично было бы и в числе &quot;222&quot; найти 2 пары &quot;22&quot;.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-11-27T19:07:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=88738#p88738</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск неповторяющихся строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=88736#p88736" />
			<content type="html"><![CDATA[<p>Кстати по поводу stringreplace. Как то нехорошо ведёт себя InStr. По логике, ведь так должно работать:<br /></p><div class="codebox"><pre><code>
file1 =
(
11111
33333
)

file2 =
(
11111
22222
22222
33333
)

Text := &quot;`n&quot; file1 &quot;`n&quot; file2 &quot;`n&quot; 
Loop, parse, Text, `n, `r 
    (A_LoopField != &quot;&quot; &amp;&amp; !InStr(Text, &quot;`n&quot; A_LoopField &quot;`n&quot;, , , 2) &amp;&amp; (Only .= A_LoopField &quot;`n&quot;)) 
MsgBox, % Only
</code></pre></div><p>Но нет.<br />Приходится вставлять </p><div class="codebox"><pre><code>StringReplace, Text, Text, `n, `n`n, all</code></pre></div><p> (9 пост).</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-11-27T17:43:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=88736#p88736</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск неповторяющихся строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=88735#p88735" />
			<content type="html"><![CDATA[<p>Ааа, прошу прощения: не вник в суть сначала.<br />Да, фильтрации повторяющихся строк явно недостаточно и да, тогда нужна петля.</p>]]></content>
			<author>
				<name><![CDATA[Drugoy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27463</uri>
			</author>
			<updated>2014-11-27T17:37:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=88735#p88735</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск неповторяющихся строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=88730#p88730" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Drugoy пишет:</cite><blockquote><p>Я не понимаю над чем тут биться.<br />1. Прочитать содержимое обоих файлов в переменные и объединить в 1 переменную. (2x fileread + concatenate)<br />2. Сортировать строки по алфавиту и удалить дублирующиеся (Sort, input, U D`n)<br />3. ...<br />4. Profit?<br />stringreplace&#039;ы тут нужны только в случае предобработки содержимого файлов, к задаче из subject&#039;а темы это относится никак.<br />Loop&#039;ы тут не нужны вообще.</p></blockquote></div><p>Но разве можно применяя команду Sort выполнить задачу?<br /></p><div class="codebox"><pre><code>input =
(
1
2
3
4
5
1
2
3
4
)

Sort, input, U D`n

MsgBox %input%</code></pre></div><p>Надо выбрать неповторяющиесь строки, результат из этого примера должен быть &quot;5&quot;.</p>]]></content>
			<author>
				<name><![CDATA[avens]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24487</uri>
			</author>
			<updated>2014-11-27T11:50:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=88730#p88730</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск неповторяющихся строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=88724#p88724" />
			<content type="html"><![CDATA[<p><strong>Drugoy</strong>, да ладно? <img src="//forum.script-coding.com/img/smilies/lol.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>2014-11-27T09:36:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=88724#p88724</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск неповторяющихся строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=88722#p88722" />
			<content type="html"><![CDATA[<p>Я не понимаю над чем тут биться.<br />1. Прочитать содержимое обоих файлов в переменные и объединить в 1 переменную. (2x fileread + concatenate)<br />2. Сортировать строки по алфавиту и удалить дублирующиеся (Sort, input, U D`n)<br />3. ...<br />4. Profit?<br />stringreplace&#039;ы тут нужны только в случае предобработки содержимого файлов, к задаче из subject&#039;а темы это относится никак.<br />Loop&#039;ы тут не нужны вообще.</p>]]></content>
			<author>
				<name><![CDATA[Drugoy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27463</uri>
			</author>
			<updated>2014-11-27T09:22:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=88722#p88722</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск неповторяющихся строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=88717#p88717" />
			<content type="html"><![CDATA[<p>Огромная благодарность всем!</p><p>Если точнее моя задача заключается в том что бы сравнить два файла со списков моих групп ВК, первый список тот что содержит ссылки групп на которые я подписан, а второй отобранные группы, вот и надо их сравнить что бы одинаковые строки убрать, а уникальные оставить, и потом вступить в эти группы.</p>]]></content>
			<author>
				<name><![CDATA[avens]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24487</uri>
			</author>
			<updated>2014-11-27T08:29:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=88717#p88717</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск неповторяющихся строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=88712#p88712" />
			<content type="html"><![CDATA[<p>Или так:<br /></p><div class="codebox"><pre><code>
file1 =
(
11111
22222
33333
77777
44444
55555
)

file2 =
(
11111
22222
88888
33333
44444
55555
)

Text := &quot;`n&quot; file1 &quot;`n&quot; file2 &quot;`n&quot; 
StringReplace, Text, Text, `n, `n`n, all
Loop, parse, Text, `n, `r 
    (A_LoopField != &quot;&quot; &amp;&amp; !InStr(Text, &quot;`n&quot; A_LoopField &quot;`n&quot;, 1, , 2) &amp;&amp; (Only .= A_LoopField &quot;`n&quot;)) 
MsgBox, % Only
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2014-11-27T05:20:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=88712#p88712</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск неповторяющихся строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=88709#p88709" />
			<content type="html"><![CDATA[<p>Или так:<br /></p><div class="codebox"><pre><code>file1 =
(
1
11111
11111
999999999
)

file2 =
(
999999999
22222
22222
2
)

Text := &quot;`n&quot; file1 &quot;`n&quot; file2 &quot;`n&quot;
StringReplace, Text, Text, `n, `n`n, all
Loop, parse, Text, `n, `r
{
   StringReplace, Text, Text, `n%A_LoopField%`n, `n%A_LoopField%`n, UseErrorLevel
      if (ErrorLevel = 1) and (A_LoopField != &quot;&quot;)
         Only .= A_LoopField &quot;`n&quot;
}
MsgBox, % Only</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2014-11-27T03:51:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=88709#p88709</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск неповторяющихся строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=88708#p88708" />
			<content type="html"><![CDATA[<p>Вот так, вроде выходит:<br /></p><div class="codebox"><pre><code>file1 =
(
11111
999999999
)

file2 =
(
999999999
22222
)

Text := file1 &quot;`n&quot; file2
Loop, parse, Text, `n, `r
{
   RegExReplace(Text, &quot;m`a)^\Q&quot; . A_LoopField . &quot;\E$&quot;, A_LoopField, Count)
   (Count = 1 &amp;&amp; Only .= A_LoopField . &quot;`n&quot;)
}
MsgBox, % Only := Trim(Only, &quot;`n&quot;)</code></pre></div><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>2014-11-27T03:20:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=88708#p88708</id>
		</entry>
</feed>
