Contents of the Article



Introduction

Single Word Check

Hilight All Error Words

Step Through And Correct Words

Manually Add words to User-xx.DIC

Spell check in a Macro



Introduction


SPFLite spell checking has been added using the recognized Hunspell support (https://hunspell.github.io), used by many other software apps such as  LibreOfficeOpenOffice.orgMozilla Firefox & Thunderbird, and Google Chrome, The spell checker not only validates spelling, but if incorrect it will offer correction suggestions.


Using Hunspell also means there are many dictionary files available online supporting a wide variety of national languages. SPFLite also ships with a selection of about 25-30 of these.


Spell support provides several methods to invoke it as discussed in the next sections.


Single Word Check


First, setup a specific key (say Ctrl-S) using KEYMAP to issue a (SpellChk) KB function.


To spell check an individual word in your document, simply place the cursor anywhere within the word and press Ctrl-S (or whatever key you chose).


    • If the word is spelled correctly, the message  '"word" is spelled correctly' will appear in the standard message area.


    • If the word is spelled incorrectly, and there are no suggestions for correction, the message  '"word" is spelled incorrectly, no suggestions' will appear in the standard message area.


    • If the word is spelled incorrectly, and there are suggestions for correction, a popup box will appear as follows:


You may now:

    • Left-click on the line - << Ignore this occurrence of "word" >> to close the popup and return to the edit screen.
    • Left-click anywhere outside the popup to also ignore the word.
    • Left-click on - << Ignore all "word" for this session >> to ignore the "word" and ignore any other occurrences in the document. The "word" will remain in the ignore state until SPFLite is restarted.
    • Left-click on - <<Add "word" to User Dictionary >> to add the word to your User Dictionary. This will make it a permanent, validly spelled word. The user dictionary will be created in the HomeData folder with a name of "User-xx.DIC" where 'xx' is the current language selection. e.g. "User-EN-CA.DIC".
    • Left-click on any of the words in the lower box to 'correct' the spelling with the chosen suggestion.


Hilight All Error Words


You may request a Spell Check of the entire document by using the SPELL primary command.


Simply enter a SPELL ALL command. The entire file will be scanned and the error words hi-lighted in the chosen hi-light color.  Here's an example, using the +YELLOW default:



Step Through And Correct Words


You may request a SPELL NEXT run. This will start scanning at the current cursor location (or top-of-screen if not in the data area), and will stop at the next misspelled word, hi-light it in your selected hi-light color (default +YELLOW). The line will be scrolled to the top of the screen and a popup will appear below it:


 


At this point you may:

    • Left-click on the line - << Ignore this occurrence of "word" >> to ignore this error and continue onward to locate the next error.
    • Left-click anywhere outside the popup to also ignore the word and continue scanning.
    • Left-click on - << Ignore all "word" for this session >> to ignore the "word" and ignore any other occurrences in the document. The "word" will remain in the ignore state until SPFLite is restarted. Scanning will resume.
    • Left-click on - <<Add "word" to User Dictionary >> to add the word to your User Dictionary. This will make it a permanent, validly spelled word. The user dictionary will be created in the HomeData folder with a name of "User-xx.DIC" where 'xx' is the current language selection. e.g. "User-EN-CA.DIC". Scanning will continue.
    • Left-click on any of the words in the lower box to 'correct' the spelling with the chosen suggestion. All other matching words in the document will be corrected at the same time. Scanning will continue
    • Left-click on - ** Terminate SPELL NEXT Processing ** to ignore the current error and exit the SPELL NEXT process. i.e. it will NOT continue the scan.


Manually Add words to User-xx.DIC


Although during spell check scans you are provided with an opportunity to add words to your User dictionary, you may wish to manually add words. This can be done using the SPELL ADD word command. This will add the specified word to your User dictionary.


There is a variation SPELL ADDT word to add a word to the in-memory word list and not to the permanent User Dictionary. This would probably only be used by a Macro which is performing spell checking.


Spell check in a Macro


It is possible for a macro to support spell checking itself. Specifically the SPELL ADD | ADDT command and the SPF_SpellChk$ macro.  The SPF_SpellChk$ macro allows the macro to spell check a specific word for correctness, and if incorrect, to receive a list of suggested corrections. For details, see SPF_SpellChk$.