#Include samp.ahk
#IfWinActive GTA:SA:MP
ChatLog = C:\Users\User\Documents\GTA San Andreas User Files\SAMP\chatlog.txt
loop
{
lastline := GetNewLine(ChatLog)
RegExMatch(var, "\[(\d\d):(\d\d):(\d\d)\] (.*)_(.*)\[(\d\d?\d?)\]: (.*)", find)
If find6 !=
{
SendChat("команда")
}
}
GetNewLine(filename)
{
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
}
!end::ExitApp
end::Reload