TextRead ( FileId , Buff )
' 実行フォルダ下のテキストファイル"Readme.txt"の内容を,
' 以下のスクリプトで1行づつ読込み内容を表示する。
Dim file1 ,buff1 ,readRtn
On Error GoTo ErrorBranch
file1 = TextOpen ( _BIN_+"Readme.txt" ,ReadOnly )
TextRead ( file1 ,buff1 )
readRtn = _RTN_
While readRtn <> _ERR_EOF_
MessageBox ( buff1 )
TextRead ( file1 ,buff1 )
readRtn = _RTN_
End
TextClose ( file1 )
Exit ( 0 )
ErrorBranch:
MessageBox ( _BIN_+"Readme.txtのファイル操作失敗" ,OK )
TextClose ( file1 )
Exit ( -1 )