home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / applications / wp / tppspell.lha / TPPSpell.rexx < prev   
Encoding:
OS/2 REXX Batch file  |  1994-11-01  |  2.9 KB  |  123 lines

  1. /*  (c) 01.11.94: Michael Bock, Vorwärtsstraße 5, D-44139 Dortmund
  2.  *               e-mail: ckun11@ux2.hrz.uni-dortmund.de
  3.  *
  4.  *           ISpell Rechtschreibkorrektur  -Arexx Skript-
  5.  *                         für TeXtPlus
  6.  */ v0.13
  7.  
  8. options results
  9.  
  10.  
  11. tflag = 1
  12.  
  13. do while (tflag=1)
  14.  
  15.  
  16.   address 'TextPlus' GetWord
  17.  
  18.  
  19.     select
  20.      when substr(result,1,1)='$' then address 'TextPlus' WRight
  21.      when substr(result,1,1)='\' then address 'TextPlus' WRight
  22.      when substr(result,1,3)='TeX' then  address 'TextPlus' WRight
  23.  
  24. OTHERWISE
  25.  select
  26.      when  substr(result,length(result),1) ='.'
  27.      then  result = substr(result,1,length(result)-1)
  28.      when  substr(result,length(result),1) =','
  29.      then  result = substr(result,1,length(result)-1)
  30.  
  31.      when  substr(result,length(result),1) ='}'
  32.      then  result = substr(result,1,length(result)-1)
  33.  
  34.      otherwise end
  35.   zwi = result
  36.   if rc =1 then tflag = 0
  37.  
  38.  
  39.  
  40.   address 'IRexxSpell' check result
  41.   r = result
  42.   r1 = substr(r,1,1)
  43.  
  44.   if r1 ='#' then
  45.   
  46.     do
  47.       address 'TextPlus' Display 'ISpell Rexx Check © 01.11.94 Michael Bock'
  48.  
  49.        hailstring = 'Wort unbekannt :'
  50.        defstring = zwi
  51.  
  52.        address 'TextPlus' RequestString hailstring'\\'defstring
  53.        if zwi = result then zwi = result
  54.        else
  55.        do
  56.        if result =''  then 
  57.                    do
  58.                     hailstring ='Wort in Bibliothek aufnehmen ?'
  59.                     address 'TextPlus' RequestString hailstring'\\'defstring
  60.                     if result ='' then tflag =0
  61.                        else address 'IRexxSpell' add defstring
  62.                     end
  63.                       
  64.                       
  65.                       
  66.                       else     do
  67.  
  68.                                 zwi = result
  69.  
  70.                                 address 'TextPlus' WDelRight
  71.                                 address 'TextPlus' Type zwi' '
  72.                                end
  73.        end
  74.  
  75.     end
  76.  
  77.     if r1='&' then
  78.     
  79.     do
  80.        address 'TextPlus' Display 'Alternativen :' r
  81.        hailstring = 'Wort unbekannt :'
  82.        defstring = zwi
  83.  
  84.        address 'TextPlus' RequestString hailstring'\\'defstring
  85.        if zwi = result then zwi = result
  86.        else
  87.        do
  88.        if result =''  then 
  89.        
  90.                    do
  91.                     hailstring ='Wort in Bibliothek aufnehmen ?'
  92.                     address 'TextPlus' RequestString hailstring'\\'defstring
  93.                     if result ='' then tflag =0
  94.                        else address 'IRexxSpell' add defstring
  95.                     end
  96.  
  97.  
  98.                       else     do
  99.  
  100.                                 zwi = result
  101.  
  102.                                 address 'TextPlus' WDelRight
  103.                                 address 'TextPlus' Type zwi' '
  104.                                end
  105.        end
  106.  
  107.  
  108.     end
  109.  
  110.  
  111.             do
  112.             address 'TextPlus' WRight
  113.             if rc = 1 then tflag = 0
  114.             end
  115.  
  116.  
  117. END
  118.  
  119.   end
  120.  
  121.  
  122. exit 0
  123.