<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; Нужна помощь с AHK для SAMP 0.3.7]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=13228&amp;type=atom" />
	<updated>2017-11-22T08:56:16Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=13228</id>
		<entry>
			<title type="html"><![CDATA[Нужна помощь с AHK для SAMP 0.3.7]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=121482#p121482" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[UserSampe[RRR]]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38893</uri>
			</author>
			<updated>2017-11-22T08:56:16Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=121482#p121482</id>
		</entry>
</feed>
