<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; Выполнения действия при определенной команды]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=12079&amp;type=atom" />
	<updated>2016-11-09T17:33:02Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=12079</id>
		<entry>
			<title type="html"><![CDATA[Re: Выполнения действия при определенной команды]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=109032#p109032" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Filename=%A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
FileDelete, %Filename%
FileAppend, %Filename%
Loop, read, %Filename%
nstroki=%A_Index%
start:
FileReadLine, stroka, %Filename%, %nstroki%
if ErrorLevel
{
nstroki-=1
goto start
}
if stroka=
{
nstroki+=1
goto start
}
IfInString, stroka, &gt;&gt; СМС от
{
if (InStr(stroka, &quot;Вы тут?&quot;)) or (InStr(stroka, &quot;Ты тут?&quot;))
{
твоё действие

sleep, 100
nstroki+=1
goto start
}
}
nstroki+=1
goto start
return</code></pre></div><p>Слова там сам поменяешь)</p>]]></content>
			<author>
				<name><![CDATA[mr.ramser]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=33354</uri>
			</author>
			<updated>2016-11-09T17:33:02Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=109032#p109032</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Выполнения действия при определенной команды]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=108375#p108375" />
			<content type="html"><![CDATA[<p>Мне нужно чтобы как только в chatlog.txt высвечивалось слово определенное, ahk выполнял действия. <br />Вот что=то набросал, но не работает. Просьба помочь в моем коде, или написать новый.</p><div class="codebox"><pre><code>settimer,Kenzo,1
Script := &quot;Вы тут?&quot;

Kenzo:
fileread, sms, %a_mydocuments%\gta san andreas user files\samp\chatlog.txt
if sms contains %Script%
     {
     SendMessage, 0x50,, 0x4190419,, A
     Send, {Up Down}
     sleep, 1700
     Send, {Up Up}
     sleep, 10
     filedelete,%a_mydocuments%\gta san andreas user files\samp\chatlog.txt
     return
}
return</code></pre></div><p>Действие должно выполняться максимально быстро.</p>]]></content>
			<author>
				<name><![CDATA[KenzoHK]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34095</uri>
			</author>
			<updated>2016-10-18T20:01:19Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=108375#p108375</id>
		</entry>
</feed>
