Hello dear friends First i hope you are all fine, my problem is like you see in the topic, i've made a script with AutoIt, in order to monitor a txt file and look fro some words on it, if they exist it will send a mail. the problem is the script can't work and when i start it it run for a few seconds and it stop. Ths script is :. #include <INet.au3>$TextFileName = "C:\Users\X2Z\Desktop\youssef\Adentech\Survey_Monitor_Close_Control_130\Survey Monitor Close Control 1.30\Log.txt"$s_SmtpServer = "smtp.gmail.com"$s_FromName = "Test"$s_FromAddress = "my email"$s_ToAddress = "their email"$s_Subject = "Test test"Dim $as_Body[2]$as_Body[0] = "Alert"$as_Body[1] = "Defaut"; First we read the text file$Log = FileRead($TextFileName); Put the contents into an array$pageArray = StringSplit($Log, @CRLF); Now go through the array and look for the word alarm if its found send and emailFor $i = 1 To $pageArray[0]If StringInStr($pageArray[$i], "alarm") Then $Response = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, @computername, -1)NextThank you for your help Best regards