#IfWinActive GTA:SA:MP
SLES := 0
suspectid := 0
suspectname := "Test"
suspectid1 := 0
suspectname1 := "Test"
path := "\GTA San Andreas User Files\SAMP\"
#Include UDF.ahk
1::
{
FileDelete, %A_MyDocuments%%path%suspect.txt
sleep 50
Loop
{
Loop, read, %A_MyDocuments%%path%chatlog.txt, %A_MyDocuments%%path%suspect.txt
{
IfInString, A_LoopReadLine, ] Вопрос от , FileAppend, %A_LoopReadLine%`n
}
Loop, read, %A_MyDocuments%%path%suspect.txt
{
RegExMatch(A_LoopReadLine, "] Вопрос от (\d+) ID ", suspectname)
RegExMatch(A_LoopReadLine, " ID (\d+): ", suspectid)
}
NewStr := RegExReplace(suspectid, " ID (\d+):", "$1")
sendinput {f6}/answ %NewStr%
Break
if SLES <> 0
{
SLES := 0
Break
}
}
sleep 1000
}
return