<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Почему не работает if var contains?]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=14831&amp;type=atom" />
	<updated>2019-06-16T09:48:25Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=14831</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Почему не работает if var contains?]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=134702#p134702" />
			<content type="html"><![CDATA[<p><strong>stealzy</strong>, но как в &quot;text&quot; могут содержаться эти значения? Когда я проверял по-отдельности, а именно &quot;if lastline contains openone&quot; или &quot;if lastline contains opentwo&quot;, то данное выражение не было удачным. А когда я подставлял нужный текст в lastline - удачным.<br />Следовательно, я считаю, что проблема в том, что я неправильно записал две переменных в &quot;&quot;if lastline contains&quot;. Такое ощущение, что он реагирует на пустую строку, которая всегда выдаёт удачу.</p>]]></content>
			<author>
				<name><![CDATA[iamsheepish]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=40207</uri>
			</author>
			<updated>2019-06-16T09:48:25Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=134702#p134702</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Почему не работает if var contains?]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=134696#p134696" />
			<content type="html"><![CDATA[<p>Доброго времени суток!<br />Я, как новичок в AHK-скриптинге, не могу понять, почему мой код не работает, как надо?<br /></p><div class="codebox"><pre><code>Numpad0::
lastline := &quot;text&quot;
RegExMatch(lastline, &quot;\[\d+:\d+:\d+\]\s+\w+\sполучил бан чата от администратора Isak_Edwards&quot;, openone)
RegExMatch(lastline, &quot;\[\d+:\d+:\d+\]\s+Администратор Isak_Edwards посадил игрока \w+ в Де Морган\. Причина:(\s+.*)&quot;, opentwo)
if lastline contains %openone%,%opentwo%
{
	MsgBox text
}
return</code></pre></div><p>В данном коде &quot;if lastline contains&quot; всегда удачное, а почему именно - мне не понятно.<br />Кто сможет, объясните поподробнее.</p>]]></content>
			<author>
				<name><![CDATA[iamsheepish]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=40207</uri>
			</author>
			<updated>2019-06-15T23:58:17Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=134696#p134696</id>
		</entry>
</feed>
