Тема: Чтение последний строки
Приветствую.
Вот ломаю голову, не понимаю как сделать так, чтобы мой скрипт читал заданные предложения, которые появились в чате последними, сейчас у меня он удаляет чат-лог, но мне бы хотелось чтобы он этого не делал. Буду очень благодарен если сможете помочь.
file := A_MyDocuments "\GTA San Andreas User Files\SAMP\chatlog.txt"
Numpad1::
sendinput, {F6}/tazer{enter}
sleep 1000
fileread, read, %file%
if read contains ] Вы оглушили
{
FileRead, NickName, %file%
RegExMatch(NickName, "\Q проводит задержание \E(.*)\Q", Nick)
sleep 400
Sendinput, {F6}/id %Nick1%{enter}
sleep 400
FileRead, file, %file%
RegExMatch(file, "\[([0-9.]*)\]", code, -400)
sleep 800
sendinput, {F6}/cuff %code1%{enter}
sleep 1000
fileread, read, %file%
if read contains ] Вы не можете надеть наручники на этого человека (он не в розыске)
{
SendMessage, 0x50,, 0x4190419,, A
sendinput, {F6}/su %code1%{space}
sleep 400
filedelete, %file%
fileappend,, %file%
}
else
{
sleep 200
sendinput, {F6}/uncuff %code1%{enter}
sleep 1100
sendinput, {F6}/cuff %code1%{enter}
sleep 400
filedelete, %file%
fileappend,, %file%
}
}
else
{
goto netu
}
netu:
return