home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / utils / sercli.shr / sercli / example / test.rexx < prev   
Encoding:
OS/2 REXX Batch file  |  1993-06-16  |  830 b   |  32 lines

  1. /*
  2. **  Run (rx) me from any DOS stream (including a FIFO via RemCLI or
  3. **  sercli).
  4. **
  5. **  Note how ARexx is a little funky about `subordinate' programs
  6. **  inheriting the same STDIN/STDOUT streams (thus the `>* <*' business); I
  7. **  _think_ this has been fixed in v2.1 of AmigaDOS or in ARexx v1.15...I
  8. **  haven't noticed the need for this in my refuse_callers.rexx script...
  9. **
  10. */
  11.     parse arg params
  12.  
  13.     address command "set_raw >* <*"
  14.     say "Being called!"
  15.     parse pull input
  16.     if '' ~= input then say "Got some input?  {"input"}"
  17.     address command "set_con >* <*"
  18.  
  19.     if ~open( io, "*" ) then do
  20.     say "Couldn't open {*}"
  21.     exit( 10 )
  22.     end
  23.  
  24.     writech( io, "Nest?  ")
  25.     answer = readln( io )
  26.     if ('y' = answer) | ('Y' = answer) then do
  27.     address command "rx >* <* test"
  28.     end
  29.  
  30.     say "Exiting..."
  31.     exit( 0 )
  32.