/* Passages: Spot Interface (Export)                     *
 * Both this script and Passages are © 1994 PSR Software */

/* $VER: Passages.export.spot v2.4  */

Address SPOT
Options Results

PATH="Passages:"
TEMP="T:Passages.temp"

'IsAreaList'
if rc=0 then do
   'requestnotify PROMPT "Do not use from area list"'
   exit
end

file=PATH || "Passages.output"
'requestresponse PROMPT "Send file 'file'" GADGETS "_Yes|_No|_Abort"'
if rc=0 then exit
if rc=2 then do
   'requestfile TITLE "Select..." PATH "'path'" FILE "Passages.output" PATTERN "Passages.output"'
   file=result
end

if (~open('in',file,'r')) | (~open('out',temp,'w')) then do
   'requestnotify PROMPT "Disk error!"'
   exit
end

do while ~eof('in')
   line=readln('in')
   line=translate(line,'PSR software','0123456789- ')
   call writeln('out',line)
end
call close('in')

call writeln('out','')
call writeln('out','      __  ___ ')
call writeln('out','      |_)( |_)        __            _ __')
call writeln('out','      |  _)| \        | )|\ ( ( |\ |  |_(')
call writeln('out','  S O F T W A R E     |¯ |¯\ ) )|¯\\_||_ ).')
call writeln('out','      presents        ')

call close('out')

'write FILE "'temp'" SUBJECT "Passages" NOSIG NOEDIT'

'requestnotify PROMPT "All done"'
