WPCubed Product Support

WPSpell + Autocorrect

Is it possible to set up an auto correct feature with WpSpell (or any other way). I mean auto correct of things like teh -> the or thnaks -> thanks

(I am using wptools 5 and wpspell on D2007)

Thanks
Didier

#1 ♥ 0
5.3k Views 2 users read 1 min

I am still looking for an answer and would love to hear your ideas ...

Didier

#2 ♥ 0
support

Hi,

The event AfterCompleteWordEvent could be used. WPSpell also uses this.

Inside this event You can read and write the current wird using the property CPWord.

You can use this also for macros:

procedure TWPTBXForm.WPRichText1AfterCompleteWordEvent(Sender: TObject;
  var lastchar: Char);
begin
  if lastchar = #32 then
  begin
    if WPRichText1.CPWord = 'mfg' then
    begin
      WPRichText1.CPWord := 'Mit freundlichen Grüssen';
    end;
  end
  else if lastchar = '+' then
    if WPRichText1.CPWord = 'mfg' then
    begin
      WPRichText1.CPWord := 'Mit freundlichen Grüssen';
    end;
end;

Regards,

Julian

#3 ♥ 0

Thank you Julian, this should give me a head start

Didier

#4 ♥ 0

This is actually the event I used and it work beautifully.

#5 ♥ 0
This category is archived. No new posts are possible.