[CODE = autohotkey]
# IfWinActive GTA: SA: MP
#NoEnv
#include SAMP.ahk
#SingleInstance, force
#UseHook
SetTimer, Update, 50
ChatLog =% A_MyDocuments% \ GTA San Andreas User Files \ SAMP \ chatlog.txt
Update:
lastline: = GetNewLine (ChatLog)
if (isDialogOpen ())
{
if (regexmatch (getDialogText (), "(Įveskite raidę)", out))
sleep 5000
sendchat (var1)
}
return
GetNewLine (filename)
{
static old
static new
if! old
{
FileGetSize, old,% filename%
new: = old
}
while old = new
{
sleep 1; Delay
FileGetSize, new,% filename%
}
old: = new
Loop, read,% filename%
if A_LoopReadLine
{
last: = A_LoopReadLine
}
return last
}
! home :: ExitApp; alt + home = exit
home :: Reload; home = reload
[/ CODE]
i tried this script but i open any gui in game it sends message no matter if it does or doesnt contain that text