[Tips]

Add A Spell Checking Function In PalEdit!


Is this useful?


PalEdit by Andreas Garzotto, is one of my favorite programs. I use it for everything that requires editing/reading of text. I also use PalEdit when I write my faxes, so it's very convenient to have the ability to do a spell check from within PalEdit.

To be able to do this, you need PalEdit of course and following programs:

1. To have EXkey installed (please follow the installation procedure in the documentation).

2. To have MAXDOS installed (please follow the installation procedure in the documentation).

3. To have GDSPELL installed (please follow the installation procedure in the documentation).

HOW TO DO THE INSTALLATION OF A COMPLETE PACKAGE:

I will here show you how I have done this, but you can of course change directories and so on according to your needs.

1.) First of all you have to modify PE.CFG (PalEdit's configuration file) and add following line under section [Filter]:
[Filter]
&Spell Check = c:\bin\maxdos.com a:\pe\spell.bat %s

2.) Under section [Labels] in PE.CFG, you add following line:
[Labels]
2 = Spell
Note: Please observe that no PalEdit Macro is associated to the above key- F2 Spell. You only need to have the label.

3.) Then you have to create spell.bat in the same directory as PalEdit with following 2 lines:
a:\gdspell\spell.exe /t:15 /s:5 %1
c:\bin\exkey -x{wait}{Menu}{f}{o}{wait}{paste}{Enter}

Note: " /t:15 /s:5" is setting the colors in GDSPELL, so you set it as you want. Please enter SPELL in the directory of GDSPELL for more information.

4.) Now you have to edit your EXKEY.INI file as follows:
[PE]
{F2}={Menu}fa{Copy}{Enter}{Enter}{Ctr+x}rs
{Shift+Right}={Shift+Home}{Shift+End}
{Shift+Left}={Shift+Home}
{Shift+Down}={Shift+Home}{Shift+End}{Down}
{Shift+Up}={Shift+Home}{Shift+End}{Up}
{Ctr+Right}={Ctr+Shift+Right}
{Ctr+Left}={Ctr+Shift+Left}
{Ctr+End}={Ctr+Shift+End}
Note: The second to seventh macro lines fix some problems which occure when you are using PalEdit and EXkey. Please see my earlier tip-"If you use PalEdit and EXkey, there is a small problem....".

5.) Before you run PalEdit, you have to install EXkey which you for example can do in your Autoexec.bat will following line:
c:\bin\exkey.com -Fc:\bin\exkey.ini

6.) To have easy access to PalEdit, you should install it in your Application Manager:
Name: &PE
Path: a:\pe\pe.exe|310
Comments:
a "?" upside down- {Fn+3}

NOTE: This will only work if you start PalEdit from the Application Manager as described above. This since EXkey must know that you are running [PE]. If you for example start PalEdit from Filer or let PNS200 open up a document, EXkey will not know that PalEdit is running and then the EXkey macros for [PE] will not work. However, this problem can also be solved, please see my earlier tip-"If you use PalEdit and EXkey, there is a small problem....".

HOW DOES IT WORK?:

When you are in PalEdit, you can see that the function key F2 will have the label "Spell". When you want to check your spelling in the active document, you hit F2 and this will activate the EXkey macro "{F2}={Menu}fa{Copy}{Enter}{Enter}{Ctr+x}rs", which is installed in the memory. This macro will jump to PalEdit's menu and go to File/Save as. Then Copy the active documents name and press Enter. PalEdit will then ask if the document should be replaced and one more Enter will confirm this. Then the EXkey macro will open the Filter menu with {Ctr+x}r and chose Spell Check which has the hot key "s".

PalEdit will now execute the line: &Spell Check = c:\bin\maxdos.com a:\pe\spell.bat %s, so it will shell out to DOS with maximum memory (you don't need the Application Manager in order to use MaxDOS) and start the batchfile spell.bat.

Spell.bat will now run GDSPELL with:
a:\gdspell\spell.exe /t:15 /s:5 %1, where "%1" contain the file name. When the spell checking is finished, GDSPELL will save the edited file under the same name. Then we will be back in the batch file (spell.bat) and following line will be executed:
c:\bin\exkey -x{wait}{Menu}{f}{o}{paste}{Enter}
This is an EXkey macro in "direct mode" and it will wait until we are back in PalEdit and then open the file again (which is now edited with GDSPELL): Menu/File/Open and Paste in the name which we earlier placed in the clipboard. Then press Enter and there we have the file again, but now it's checked for spelling errors! If you have any problems with this last macro, try to play around with the {wait} command (please check the EXkey documentation).

This was one way to build-in spell checking in PalEdit. I hope you find it as useful as I do.



My e-mail address:

jorgen@hp200lx.net

  • Any questions, comments or so- please send me an e-mail!
    [Tips]

    This page was last modified on Wednesday, 12-Feb-97