If you ran my script as it is and you just renamed your text files to match the the filenames in the script, and it worked for you then the lines you edited in the script are most likely the problem. I noticed you don't have quotes surrounding your new names. Did you forget them in the script?
However; I noticed that my script terminated before the last line in the "text cluster file" was checked. Should be fixed in the script below.
#include <File.au3>
#include <Misc.au3>
Opt("MustDeclareVars", 1)
Global $hDLL = DllOpen("user32.dll")
Global $keywordsFile = 'keywords.txt'
Global $textCluster = 'text.txt'
Global $iFile, $aKeyWords, $iNumOfLines, $hResultFile
Global $i, $ii, $iCount = 1, $sRet
;Check for keywords file
If Not FileExists($keywordsFile) Then
MsgBox(48, 'ERROR', 'Keywords file not found.' & @CRLF& 'Program Terminated.')
Exit
EndIf
;Check for text cluster file
If Not FileExists($textCluster) Then
MsgBox(48, 'ERROR', 'Text Cluster file not found.' & @CRLF& 'Program Terminated.')
Exit
EndIf
$iFile = _FileReadToArray($keywordsFile, $aKeyWords)
If $iFile = 0 Then
MsgBox(48, 'ERROR', 'Error: ' & @error & @CRLF & 'Check Autoit help file for _FileReadToArray() function')
Exit
EndIf
$hResultFile = FileOpen('result.txt',1)
$iNumOfLines = _FileCountLines($textCluster)
For $i = 1 To $iNumOfLines
If _IsPressed('1b', $hDLL) Then ; Press the escape key to quit
ExitLoop
EndIf
$sRet = FileReadLine($textCluster, $iCount)
For $ii = 1 To UBound($aKeyWords, 1) -1
If StringInStr($sRet, $aKeyWords[$ii], 2, -1) Then
FileWrite($hResultFile, $sRet & @CRLF)
EndIf
Next
If $iCount = $iNumOfLines Then
ExitLoop
EndIf
$iCount = $iCount + 1
Next
FileClose($hResultFile)
DllClose($hDLL)
Exit