<?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=11263&amp;type=atom" />
	<updated>2016-01-29T12:17:48Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=11263</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск текста в блокноте и вывод его в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100718#p100718" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, ошибся, думал как и в <em>Loop, Parse</em> третий параметр символ разделения.<br /><strong>becauseim</strong>, Да вроде работает, что и с третьим параметром и без него(в первом моем посте тоже работает.)<br /></p><div class="codebox"><pre><code>loop,read,C:\file.txt
msgbox % A_LoopReadLine</code></pre></div>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2016-01-29T12:17:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100718#p100718</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск текста в блокноте и вывод его в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100716#p100716" />
			<content type="html"><![CDATA[<p>Оффтоп:<br /><strong>yalanne</strong>, а зачем тут нужен третий параметр? </p><div class="codebox"><pre><code>loop,read, d:\file.txt,`n</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2016-01-29T11:39:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100716#p100716</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск текста в блокноте и вывод его в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100712#p100712" />
			<content type="html"><![CDATA[<p><strong>yalanne</strong>, а как задать путь расположения текстового файла для поиска?<br />Пробовал так:<br /></p><div class="codebox"><pre><code>loop,read, d:\file.txt,`n</code></pre></div><p>Не получилось.</p>]]></content>
			<author>
				<name><![CDATA[becauseim]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33149</uri>
			</author>
			<updated>2016-01-29T01:14:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100712#p100712</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск текста в блокноте и вывод его в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100704#p100704" />
			<content type="html"><![CDATA[<p>Удали знак <strong>$</strong> в скрипте.</p>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2016-01-28T09:18:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100704#p100704</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск текста в блокноте и вывод его в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100701#p100701" />
			<content type="html"><![CDATA[<p>Спасибо огромное. <br />Но я увидел проблемку. Скрипт не хочет искать дальше совпадения если в строке есть в конце пробелы.<br /><a href="http://hostingkartinok.com/show-image.php?id=bf4bb4214c21d25eb07168ffcfd22906"><span class="postimg"><img src="http://s8.hostingkartinok.com/uploads/images/2016/01/bf4bb4214c21d25eb07168ffcfd22906.png" alt="http://s8.hostingkartinok.com/uploads/images/2016/01/bf4bb4214c21d25eb07168ffcfd22906.png" /></span></a></p>]]></content>
			<author>
				<name><![CDATA[pro100_AHK]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26786</uri>
			</author>
			<updated>2016-01-28T07:12:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100701#p100701</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Поиск текста в блокноте и вывод его в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100695#p100695" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>; Создаем gui.

Gui, add,Edit
Gui, add,button,Gbt1,Искать ; bt1 - метка перехода на кнопке.
Gui,Show,w170 ; показываем окно с шириной 170p
return

;событие на клик кнопки.
bt1:
GuiControlGet,Edit1 ;получаем значение edit поля.
finded_list := &quot;&quot; ; очистка с предыдущего результата.
loop,read,file.txt,`n ;читаем содержимое file.txt по строчно. 
	RegExMatch(A_LoopReadLine,&quot;^&quot; Edit1 &quot; send (\d+)&quot;,var) ; ищем и извлекаем текст  подходящий
	;под шаблон &quot;[поиск_с_начала_строки][текст_в_edit_поле][пробел_send_пробел][любое_кол-во цифр круглые скобки занесут это значение в переменную][конец_строки]&quot;.
	,var1 and (finded_list .= (finded_list ? &quot; и &quot; : &quot;&quot;) var1) ; если есть совподение поиска, то перечесляем через &quot;и&quot; все значения.

msgbox % finded_list  ; выводим найденное.
return ; конец.</code></pre></div>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2016-01-27T18:28:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100695#p100695</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Поиск текста в блокноте и вывод его в окне]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100690#p100690" />
			<content type="html"><![CDATA[<p>Здравствуйте. Помогите с реализацией данного скрипта или же натолкните на нужный путь. Строго не судите, только учусь</p><p>Что нужно:<br />Есть блокнот file.txt с информацией. Нужно что бы скрипт искал что я ввожу и выводил в окно уже ответ, но если нету в блокноте того что ищу то выводил сообщения об этом.<br />Например: <br />1.GUI поиска: s4322 , а GUI ответа: 2133<br />2.GUI поиска: s9855 , а GUI ответа: Нету содержимого</p><p>Помогите пожалуйста реализовать это. Я знаю это не тяжело но я только учусь. Спасибо заранее!</p>]]></content>
			<author>
				<name><![CDATA[pro100_AHK]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26786</uri>
			</author>
			<updated>2016-01-27T17:26:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100690#p100690</id>
		</entry>
</feed>
