<?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=16630&amp;type=atom" />
	<updated>2021-10-03T21:40:36Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16630</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Почему при сравнении совпадают разные строки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149873#p149873" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>if (str1 . &quot;&quot; == str2 . &quot;&quot;)</code></pre></div><p>Еще проще так:<br /></p><div class="codebox"><pre><code>if (str1 &quot;&quot; = str2)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-10-03T21:40:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149873#p149873</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Почему при сравнении совпадают разные строки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149866#p149866" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>__Михаил__ пишет:</cite><blockquote><p>Через АХК такие опасные манипуляции бы не совершал.</p></blockquote></div><p>А причём тут AHK? RegEx, который в данном случае вы использовали — это отдельный модуль, он везде одинаково работает. Выстрелить себе в ногу можно при желании, используя любой ЯП.<br />Конкретно данная проблема решена в v2.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-10-03T17:39:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149866#p149866</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Почему при сравнении совпадают разные строки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149865#p149865" />
			<content type="html"><![CDATA[<p>Через АХК такие опасные манипуляции бы не совершал.<br />А так, очень плохо, что очевидные вещи в АХК не реализованы как в других языках.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-10-03T17:30:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149865#p149865</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Почему при сравнении совпадают разные строки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149864#p149864" />
			<content type="html"><![CDATA[<p><strong>__Михаил__</strong>, если бы вам нужно было выбрать номер, на который нужно было бы отправить крупную сумму денег, думаю, не были бы так уверены.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-10-03T17:07:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149864#p149864</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Почему при сравнении совпадают разные строки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149863#p149863" />
			<content type="html"><![CDATA[<p>Сомневаюсь, что кол-во чисел в данном случае будут разные.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-10-03T16:56:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149863#p149863</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Почему при сравнении совпадают разные строки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149862#p149862" />
			<content type="html"><![CDATA[<p>Всем спасибо! Скрипт готов. AutoHotKey - просто находка! Настолько облегчает мне работу)</p>]]></content>
			<author>
				<name><![CDATA[mike.sunday19]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42017</uri>
			</author>
			<updated>2021-10-03T16:33:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149862#p149862</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Почему при сравнении совпадают разные строки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149861#p149861" />
			<content type="html"><![CDATA[<p>Ну, я бы так не стал решать:<br /></p><div class="codebox"><pre><code>str1 := &quot;99999999999999999999&quot;
str2 := &quot;999&quot;
If (str1 ~= str2)
 MsgBox, Номера счетов совпадают!
Else
 MsgBox, Номера счетов не совпадают!</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-10-03T16:21:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149861#p149861</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Почему при сравнении совпадают разные строки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149860#p149860" />
			<content type="html"><![CDATA[<p>Проще было так решить:</p><div class="codebox"><pre><code>str1 := &quot;99999999999999999999&quot;
str2 := &quot;40817495375183257123&quot;
If (str1 ~= str2)
 MsgBox, Номера счетов совпадают!
Else
 MsgBox, Номера счетов не совпадают!
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2021-10-03T16:01:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149860#p149860</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Почему при сравнении совпадают разные строки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149859#p149859" />
			<content type="html"><![CDATA[<p>RegExMatch()</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-10-03T15:42:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149859#p149859</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Почему при сравнении совпадают разные строки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149858#p149858" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong> понял, спасибо!<br />Подскажите пожалуйста еще, как можно отличать цифру от любого другого символа?<br />Вот например есть файлы .txt с кучей текста. И где-то среди этого текста есть номер счета. Я знаю только первые 5 цифр счета. Они будут постоянны для любого счета.<br />Чтобы его вычленить оттуда, мне нужно отличать цифры от других символов.<br />Подскажите, есть способ?</p>]]></content>
			<author>
				<name><![CDATA[mike.sunday19]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42017</uri>
			</author>
			<updated>2021-10-03T15:29:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149858#p149858</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Почему при сравнении совпадают разные строки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149857#p149857" />
			<content type="html"><![CDATA[<p>Переменные, значения которых состоят только из цифр, при операции сравнения интерпретируются как числа, а так как данные числа превышают максимально допустимые, они приводятся к виду:<br /></p><div class="codebox"><pre><code>str1 := &quot;99999999999999999999&quot;
str2 := &quot;40817495375183257123&quot;
MsgBox, % str1 + 0 . &quot;`n&quot;
        . str2 + 0</code></pre></div><p>Для сравнения в данном случае можно применить такой трюк:<br /></p><div class="codebox"><pre><code>str1 := &quot;99999999999999999999&quot;
str2 := &quot;40817495375183257123&quot;
if (str1 . &quot;&quot; == str2 . &quot;&quot;)
   MsgBox, Номера счетов совпадают!
else
   MsgBox, Номера счетов не совпадают!</code></pre></div><div class="quotebox"><cite>Documents пишет:</cite><blockquote><p><strong>Numeric strings:</strong> A string of digits (or any other supported number format) is automatically interpreted as a number when a math operation or comparison requires it. In AutoHotkey v1, comparisons are performed numerically if both values are numeric even if both values are strings. However, a quoted string (or the result of concatenating with a quoted string) is never considered numeric when used directly in an expression.</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2021-10-03T13:42:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149857#p149857</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Почему при сравнении совпадают разные строки?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=149856#p149856" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
str1 := &quot;99999999999999999999&quot;
str2 := &quot;40817495375183257123&quot;
if(str1 == str2)
	MsgBox, Номера счетов совпадают!
else
	MsgBox, Номера счетов не совпадают!
</code></pre></div><p>Почему-то строки совпадают, хотя они разные! В чем дело? И как правильно сравнить эти строки?</p>]]></content>
			<author>
				<name><![CDATA[mike.sunday19]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42017</uri>
			</author>
			<updated>2021-10-03T13:13:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=149856#p149856</id>
		</entry>
</feed>
