clear(){
File = %A_MyDocuments%\GTA San Andreas User Files\CR-MP\GenerationC\chatlog.txt
FileDelete, % file
FileAppend, % file
}
Loop{
File = %A_MyDocuments%\GTA San Andreas User Files\CR-MP\GenerationC\chatlog.txt
FileRead, read, %file%
if (RegExMatch(read, "\Q\E(.*)\Q[\E(.*)\Q]: Привет", out)){
SendInput, {F6}/hi %out2%{Enter}
clear()
}
}