<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; Нужна помощь с AHK для SAMP 0.3.7]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=13228</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=13228&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Нужна помощь с AHK для SAMP 0.3.7».]]></description>
		<lastBuildDate>Wed, 22 Nov 2017 08:56:16 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Нужна помощь с AHK для SAMP 0.3.7]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=121482#p121482</link>
			<description><![CDATA[<p>Здравствуйте.<br />Нужна помощь.<br />Суть в том,что я нашел скрипт,позволяющий при виде слова &quot;привет&quot;,отправлять человеку который это отправил &quot;Здравствуйте&quot;<br />Но я играю на таком сервере,где чтобы отправить смс,надо писать не ID,а номер человека.<br />Как сделать чтоб он считывался откуда-то?<br />Я совсем уж 0 в AHK.</p><p>Собственно,сам скрипт.</p><p>FileCLog:=% A_MyDocuments &quot;\GTA San Andreas User Files\SAMP\chatlog.txt&quot;</p><p>loop<br />{</p><p>lastline := GetNewLine(FileCLog)</p><p>If lastline contains привет,здрав,здаров<br />{<br />RegExMatch(lastline, &quot;i).*\[([0-9]*)\]: \{FFCD00\}.*&quot;, idPl)<br />Sendinput {F6}/sms %idPl1% Здравствуйте{ENTER}<br />}</p><p>}</p><p>GetNewLine(filename)<br />{ ;функция чтения последней строки, если файл изменен каждыее 100 мс<br />static old<br />static new<br />if !old<br />{<br />FileGetSize, old, %filename%<br />new := old<br />}<br />while old = new<br />{<br />sleep 100<br />FileGetSize, new, %filename%<br />}<br />old := new<br />Loop, read, %filename%<br />if A_LoopReadLine<br />{<br />last := A_LoopReadLine ;последняя строка<br />}<br />return last<br />}</p><p>Заранее спасибо.</p>]]></description>
			<author><![CDATA[null@example.com (UserSampe[RRR])]]></author>
			<pubDate>Wed, 22 Nov 2017 08:56:16 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=121482#p121482</guid>
		</item>
	</channel>
</rss>
