home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Elysian Archive
/
AmigaElysianArchive.iso
/
wp_dtp
/
ispell.lha
/
WordSpell.ced
< prev
next >
Wrap
Text File
|
1991-02-08
|
2KB
|
52 lines
/*
* WordSpell.ced ... ARexx Program to spell check a word while in CED!
* Requires ISpell version 2.1ljr with ARexx Server mode and CED v2.12.
* Started: 12/19/89
* Updated for CED v2.0: Tue Jan 23 03:11:24 1990
* Last update: Fri Feb 1 07:46:30 1991
* Copyright (C) 1989, 1990, 1991 Loren J. Rittle
* Use as you will, just document your changes and keep my copyright
* notice intact.
*/
options results
if pos('IRexxSpell',(show(ports))) = 0 then do
address command 'runback ispell -r >null: <null:'
address command waitforport 'IRexxSpell'
end
status 87; bytepos = result;
status 55; line = result;
parse var line curline '0a'x
curpos = 0
do forever
curpos=pos('09'x, curline, curpos+1)
if curpos == 0 then break
curline = overlay(' ', curline, curpos)
end
do i = 1 to words(curline)
if wordindex(curline, i)-1 > bytepos then
break
end
item = compress( word( curline, i-1 ), ' ~`,./<>?;:"[]{}!@#$%^&*()+|=\' )
if item = '' then exit
address 'IRexxSpell' check item
r = result
r1 = substr(r,1,1)
select
when r1 = '*' then nop
when r1 = '&' then
if words(r) = 2 then
okay1 "The word '"||item||"' is not found."||"0A"X||"Try this word:" substr(r,3)
else
okay1 "The word '"||item||"' is not found."||"0A"X||"Try these words:" substr(r,3)
when r1 = '#' then okay1 "Nothing even close to '"||item||"' found in dictionary!"
when r1 = '+' then nop /* spell would print a warning here! */
otherwise okay1 "For the word '"||item||"' I got" r
end
exit