home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / wp_dtp / ispell.lha / spell.rexx < prev    next >
OS/2 REXX Batch file  |  1991-02-08  |  1KB  |  37 lines

  1. /* 
  2.  *  spell.rexx spell checks a word using ISpell in ARexx server mode
  3.  *  Requires ISpell version 2.1ljr with ARexx Server mode.
  4.  *  Started: 11/7/89
  5.  *  Last Update: LJR  Sun Jun 03 21:29:40 1990
  6.  *
  7.  *  Copyright (C) 1989,1990  Loren J. Rittle
  8.  *  Use as you will, just document your changes and keep my copyright
  9.  *  notice intact.
  10.  */
  11. parse arg item cmdline
  12. options results
  13. if item = "" then do
  14.     say "Usage: spell word1 word2 ..."
  15.     exit
  16. end
  17. if pos('IRexxSpell',(show(ports))) = 0 then do
  18.     'runback ispell -r >null: <null:'
  19.     waitforport 'IRexxSpell'
  20. end
  21. address 'IRexxSpell' check item
  22. r = result
  23. r1 = substr(r,1,1)
  24. select
  25.     when r1 = '*' then nop
  26.     when r1 = '&' then 
  27.         if words(r) = 2 then 
  28.             say "The word '"||item||"' is not found. Try this word:" substr(r,3)        
  29.         else
  30.             say "The word '"||item||"' is not found. Try these words:" substr(r,3)
  31.     when r1 = '#' then say "Nothing even close to '"||item||"' found in dictionary!"
  32.     when r1 = '+' then say "No root word found for the word '"||item||"'. Closest root found:" substr(r,3)
  33.     otherwise say "For the word '"||item||"' I got" r
  34.     end
  35. if cmdline ~= "" then call spell cmdline
  36. exit
  37.