home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 9
/
FreshFishVol9-CD2.bin
/
bbs
/
util
/
gedscripts-1.1.lha
/
GEDScripts
/
ISpell
/
WordCheck.ged
< prev
next >
Wrap
Text File
|
1994-02-15
|
2KB
|
69 lines
/*
* WordCheck.ged - a prog to check the word you just typed with GUIspell
* needs GoldED 0.97, GUIspell 1.1 (I make it appear on GoldED screen)
* and of course the Ispell in Rexx Server mode
*
* Done by Rene Laederach
*
* © 1994 by Rene Laederach, FreeWare
*
* Startup and closedown of script by Dietmar Eilert
*
* taken straight from `empty.ged'
*
* Actually quite simple to implement a check routine. Why had LJR such an
* impractical solution that was incredibly complicated?
*
*/
OPTIONS RESULTS /* enable return codes */
if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
address 'GOLDED.1'
'LOCK CURRENT' /* lock GUI, gain access */
OPTIONS FAILAT 6 /* ignore warnings */
SIGNAL ON SYNTAX /* ensure clean exit */
if ~show(ports, 'IRexxSpell') then /* Change the path to your setup */
do
address command 'run <nil: >nil: prg:ispell -r >nil: <nil:'
address command waitforport 'IRexxSpell'
end
'LEFT'
'LEFT'
'QUERY WORD'
testword = result
item = compress(testword, ' ~`,./<>?;:"[]{}!@#$%^&*()+|=\' )
address 'IRexxSpell' quickcheck item
IF RESULT = 'bad' THEN DO
IF ~show(ports, 'GUISpell') THEN DO
ADDRESS COMMAND 'run <nil: >nil: prg:GUISpell <nil: >nil:'
ADDRESS COMMAND waitforport 'GUISpell'
end
ADDRESS "GUISpell"
CHECKCALLBACKHOOK 'rexx:GoldED/WordCheckCallBack.ged' testword item
CHECK item
END
else DO
ADDRESS "GOLDED.1"
'RIGHT' /* Word was OK so I move cursor back into position */
'RIGHT'
END
ADDRESS "GOLDED.1"
'UNLOCK' /* VERY important: unlock GUI */
EXIT
SYNTAX:
SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
'UNLOCK'
EXIT