Well, personally, I think an ASCII primer should be required reading in grade school. ;\)

Despite Unicode and MultiByte and even the occasional UniCycle ;\) , basic scripting and page formatting still relies on control codes, and a basic understanding of them is important.

I regularly use US, FS, SOT, EOT and other "separator" characters in my scripts. Chr(31) is a valid ASCII code that works well (and somewhat officially) as a delimiter in split, join, and even message strings when I need a delimiter and can't use a printable charachter.

In fact, I regularly transmit arrays of arrays via socket communications in Kix where the outer array (record) is delimited with Chr(31) and the inner (field) array is delimited with Chr(30). Works exceptionally well and doesn't interfere with the payload.

Just to throw an alternative solution out there, here's a simple script that accomplishes both tasks - break a file into separate page files, and locate a string on each page and determine if the line(s) that follow contain data:
 Code:
; This script relies on the FileIO function
Call '%KIXLIBPATH%\FileIO.kxf'

$FPath = 'c:\temp\'					; location of file(s)
$File = 'test.txt'					; name of file

$aData = FileIO($FPath + $File, 'R')			; read the original file
$aData = Join($aData, @CRLF)				; Combine into a single string
$aData = Split($aData, Chr(12))				; break on FormFeed chars

; This block will break the original file into separate files per page
; This solves the original request, but is not needed to continue 
; to the next section which checks for data after a specific string
; on each page
For $Page = 0 to UBound($aData)				; enumerate pages
  $SubFile = Right('0000' + $Page, 4) + '_' + $File	; create page filename "0000_filename.txt"
  $aSubData = Split($aData[$Page],@CRLF)		; create array of lines for current page
  $ = FileIO($FPath + $SubFile, 'W', $aSubData)		; write the sub-file
Next


; at this point, we have an array of pages as a simple string
; Using a similar logic block, we can search each page for a string and then check the next two lines

For $Page = 0 to UBound($aData)				; enumerate pages
  $aSubData = Split($aData[$Page],@CRLF)		; create array of lines for current page
  $SearchStart = AScan($aSubData, 'findme', 1, , 1)	; locate the line with the search phrase
  If $SearchStart					; was it found? will be zero if not
    ; the search phrase was found in the current page on the line represented by $SearchStart
    ; Check the next two lines for data, but only if at least 2 more lines are present on the page
    If UBound($aSubData) >= $SearchStart + 2
      If $aSubData[$SearchStart + 1] 			; FindMe + 1 has data
        ; do something, such as
        'Page ' ($Page + 1) ' - search line 1 contains ' $aSubData[$SearchStart + 1] ?
      EndIf
      If $aSubData[$SearchStart + 2] 			; FindMe + 2 has data
        'Page ' ($Page + 1) ' - search line 1 contains ' $aSubData[$SearchStart + 2] ?
        ; do something
      EndIf
    EndIf
  EndIf
Next
Glenn
_________________________
Actually I am a Rocket Scientist! \:D