<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: IfInString искать только целую строку]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14314&amp;type=atom" />
	<updated>2018-11-13T06:01:17Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=14314</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: IfInString искать только целую строку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129717#p129717" />
			<content type="html"><![CDATA[<p>Лучше использовать регулярное выражение:<br /></p><div class="codebox"><pre><code>MyFile := &quot;file.txt&quot;
FileAppend, `naaa, % MyFile
FileRead, filetext, % MyFile
test := &quot;aaa&quot;
res := RegExMatch(filetext, &quot;m`a)^\Q&quot; . test . &quot;\E$&quot;)
MsgBox, % &quot;Строка &quot; . (res ? &quot;&quot; : &quot;не &quot;) . &quot;найдена&quot;

test := &quot;aa&quot;
res := RegExMatch(filetext, &quot;m`a)^\Q&quot; . test . &quot;\E$&quot;)
MsgBox, % &quot;Строка &quot; . (res ? &quot;&quot; : &quot;не &quot;) . &quot;найдена&quot;
Return   
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-11-13T06:01:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129717#p129717</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: IfInString искать только целую строку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=129710#p129710" />
			<content type="html"><![CDATA[<p>Как заставить IfInString искать только совпадение целой строки?<br />То есть, ввожу в файл aaa<br />ищу aa<br />он выдает &quot;есть&quot;<br /></p><div class="codebox"><pre><code>
MyFile = file.txt
	FileRead, filetext, %MyFile%
	AAA = %Clipboard%
	IfInString, filetext, %AAA%
	{
		MsgBox, It&#039;sInFile
	} Else {
		FileAppend, % (filetext=&quot;&quot; ? &quot;&quot; : &quot;`n&quot;) . AAA, %MyFile%
		MsgBox, NowInFile
	}
	Return	
</code></pre></div><p>Пробовал делать &quot;AAA = %Clipboard%`n&quot; всегда пишет &quot;нету&quot;<br />Или он так не может и надо юзать что то сложнее?<br />PS или можно еще как то лучше??</p>]]></content>
			<author>
				<name><![CDATA[Gh0sTG0]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39523</uri>
			</author>
			<updated>2018-11-12T19:48:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=129710#p129710</id>
		</entry>
</feed>
