$hFile = FileOpen(@ScriptDir & '\test.txt', 0)
$sLine = FileRead($hFile)
$sText = "текст"
$aParts = StringSplit($sLine,$sText,1)
If $aParts[0] = 1 Then
MsgBox(0,"", "текст не найден")
Else
StringReplace($aParts[1],@CR,"")
$n = @extended + 1
MsgBox(0,"", "номер строки = "&$n)
EndIf