lnLines = alines(arrLines, FileToStr('myFile.txt')) for ix=1 to lnLines if atc(lcSearchText,arrLines[m.ix]) > 0 && Found line if m.ix + m.RowOffsett < m.lnLines && Check if offsett is in range ? arrLines[m.ix] endif exit endif endfor2) Assuming no line is longer than 1024 (memowidth limit)
set memowidth to 1024 lcFileContent = FileToStr(lcFileName) lnFoundAtLine = atcline(lcSearchStr, lcFileContent) if m.lnFountAtLine + m.lnOffsett <= memlines(m.lcFileContent) ? mline(m.lcFileContent, m.lnFountAtLine + m.lnOffsett) && Might also utilize 3rd param endif3) Assuming no line is longer than 255:
create cursor myTemp (myLine c(255)) append from (lcFileName) type SDF locate for atc(m.lcSearchStr,myLine) > 0 if !eof() skip m.nOffsett ? myLine endif4) Lowlevel - assuming no line is over 8192
handle = fopen(lcFilename) do while !feof() if atc(m.lcSearched, Fgets(handle,8192)) > 0 for ix=1 to m.nOffsett if !feof() Fgets(handle,8192) endif endfor if !feof() ? fgets(handle,8192) endif exit endif enddoetc etc. None is tested, nOffsett adjusment isn't made. Yet there are other methods that excel simply wouldn't be able to even show (at least not with my hardware).