<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; SAMP. Обнаружение строки в чате]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=11747&amp;type=atom" />
	<updated>2016-07-08T09:16:31Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=11747</id>
		<entry>
			<title type="html"><![CDATA[Re: SAMP. Обнаружение строки в чате]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=105979#p105979" />
			<content type="html"><![CDATA[<p>Попробуй на примере этого сделать свое:<br /></p><div class="codebox"><pre><code>FileCLog:=% A_MyDocuments &quot;\GTA San Andreas User Files\SAMP\chatlog.txt&quot;

loop
{

lastline := GetNewLine(FileCLog)

If lastline contains привет,здрав,здаров, Привет
{
RegExMatch(lastline, &quot;i).*\[([0-9]*)\]: \{FFCD00\}.*&quot;, idPl)
Sendinput {F6}/sms %idPl1% Здравствуйте{ENTER}
}

}

GetNewLine(filename)
{ ;функция чтения последней строки, если файл изменен каждыее 100 мс
static old
static new
if !old
{
FileGetSize, old, %filename%
new := old
}
while old = new
{
sleep 100
FileGetSize, new, %filename%
}
old := new
Loop, read, %filename%
if A_LoopReadLine
{
last := A_LoopReadLine ;последняя строка
}
return last
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Bamboocho]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34017</uri>
			</author>
			<updated>2016-07-08T09:16:31Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=105979#p105979</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: SAMP. Обнаружение строки в чате]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=105616#p105616" />
			<content type="html"><![CDATA[<p><span style="color: green"><strong>44</strong>, ознакомьтесь с <a href="http://forum.script-coding.com/viewtopic.php?id=9590">этой</a> темой, отредактируйте свои посты.</span> Пока ответы в теме запрещены.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-06-27T18:13:47Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=105616#p105616</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: SAMP. Обнаружение строки в чате]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=105612#p105612" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>SeaVodikendu пишет:</cite><blockquote><p>К примеру:<br /></p><div class="codebox"><pre><code>
Search:
A=0
Loop, read, %path%chatlog.txt
{
last_line := A_LoopReadLine
}

if last_line = &quot;12345&quot;

{
A=1
Sendinput, {F6}54321{enter}
Goto, Search
}

If !a

{
Goto, Search
}
}
Return
</code></pre></div></blockquote></div><p>не работает как надо</p>]]></content>
			<author>
				<name><![CDATA[44]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34001</uri>
			</author>
			<updated>2016-06-27T16:34:40Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=105612#p105612</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: SAMP. Обнаружение строки в чате]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=105430#p105430" />
			<content type="html"><![CDATA[<p>К примеру:<br /></p><div class="codebox"><pre><code>
Search:
A=0
Loop, read, %path%chatlog.txt
{
last_line := A_LoopReadLine
}

if last_line = &quot;12345&quot;

{
A=1
Sendinput, {F6}54321{enter}
Goto, Search
}

If !a

{
Goto, Search
}
}
Return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[SeaVodikendu]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=33752</uri>
			</author>
			<updated>2016-06-21T17:29:03Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=105430#p105430</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[SAMP. Обнаружение строки в чате]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=105429#p105429" />
			<content type="html"><![CDATA[<p>Необходимо чтобы при КАЖДОМ обнаружении в chatlog строки &quot;12345&quot; моментально выполнялось действие (например Sendinput {F6}54321{enter})</p>]]></content>
			<author>
				<name><![CDATA[44]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34001</uri>
			</author>
			<updated>2016-06-21T17:03:50Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=105429#p105429</id>
		</entry>
</feed>
