clear(){
FileDelete, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
FileAppend, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
}
#Persistent
#Include samp.ahk
base := []
base[1] := "Blasthack" ; Вопрос 1
base[2] := "CM" ; Вопрос 2
base[3] := "Samp RP" ; Вопрос 3
Send := []
Send[1] := "Форум" ; Ответ 1
Send[2] := "Ф.Р...М" ; Ответ 2
Send[3] := "Role play server" ; Ответ 3
max = 3 ; Укзываем сколько элементов в массиве
i = 1
Loop{
FileRead, read, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
IfInString, read, % base[i]
{
SendInput,{f6}
SendInput, % send[i]
clear()
}
i++
if(i == max + 1)
{
i = 1
clear()
}
Sleep, 10
}