Text grammar check by Word's spelling

You can share your experience with HMG. Share with some screenshots/project details so that others will also be benefited.

Moderator: Rathinagiri

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Text grammar check by Word's spelling

Post by Pablo César »

Hi everybody,

Putting automation to work. More once again, the technology that holds the whole thing together is COM (Component Object Model) or Common Object Model which specifies ways for applications to work together, incorporating the OLE/ActiveX.

I made this demo with the intention to illustrate how many options we have together with Harbour + HMG + VBA.
Screen179.png
Screen179.png (18.11 KiB) Viewed 4902 times
 
Based on the demo that bpd2000 posted, thanks Dave for showing me the way and serving as a source of inspiration.
SpellCheck.rar
Source files
(2.91 KiB) Downloaded 254 times
Demo1_Exe.rar
Executable file
(1.22 MiB) Downloaded 245 times
 
And sincerely I hope that it will inspire others as well and even more with other custom dictionary inclusively options.

For be fun and instructive at the same way... :P
Last edited by Pablo César on Tue Apr 11, 2017 7:53 pm, edited 1 time in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
serge_girard
Posts: 3162
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Text grammar check by Word's spelling

Post by serge_girard »

Great work Pablo!

With suggestions it works, but without it get hung up!
WINWORD.EXE has started but nothing happens and all functions are blocked.
I use W7-32bits and ran your DEMO1.EXE. This was also the case with the first demo.

Serge
There's nothing you can do that can't be done...
User avatar
serge_girard
Posts: 3162
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Text grammar check by Word's spelling

Post by serge_girard »

Ooops... I was mistaken by the Word Window hidden underneath all other window-forms. Sorry Pablo, I didn't expect this behaviour!
It works just great!

Serge
There's nothing you can do that can't be done...
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: Text grammar check by Word's spelling

Post by Pablo César »

Thank you Serge.
Ooops... I was mistaken by the Word Window hidden underneath all other window-forms. Sorry Pablo, I didn't expect this behaviour!
It works just great!
It's allright Serge.

I was preparing this text for your previous message. Now happy to know it was that the reason...
I'll let this message like this, probably others could it happen the same.
With suggestions it works, but without it get hung up!
Suggestions, It just to ilustrate. The rest could be done better for sure: replacing, stop, etc...
WINWORD.EXE has started but nothing happens and all functions are blocked.
In this case you would make manually focus on WINWORD, I guess. It happen to me too. Try wih ALT TAB and look up for Word.

That's cound be improved with SearchWindow function and Restore/SetForegroundWindow/BringWindowToTop WINWORD's Window.
These function you can find at my PrintFile project ( at this topic )

Sorry Serge, but I do not wish to spend more time with Word spelling engine...

Certainly, there are many other ways to do better than by WinWord.
Last edited by Pablo César on Tue Apr 11, 2017 8:12 pm, edited 2 times in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
serge_girard
Posts: 3162
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Text grammar check by Word's spelling

Post by serge_girard »

Sure, I understand it was just 'nice-to-have'!

Serge
There's nothing you can do that can't be done...
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: Text grammar check by Word's spelling

Post by bpd2000 »

Hi Pablo
Thank you for such nice creation
Is there any way to bring Activex/Object Window on Top
I full agree with observation of Serge, that program is hang up!
BPD
Convert Dream into Reality through HMG
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: Text grammar check by Word's spelling

Post by Pablo César »

Is there any way to bring Activex/Object Window on Top
Did you mean: bring on TOP the WinWord, instead ?
I full agree with observation of Serge, that program is hang up!
Please try to explain some more about "hang up" you referring to.
I am not understanding what it is hanging up... :?

Are you referring to the hiden window of WinWord ?
In case: it seems to be hang up, but it behind...
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: Text grammar check by Word's spelling

Post by Pablo César »

Hi Dave, you said "Hang up" but did not specied how...

Now I understand Claudio how he feels when all saying: IDE is "crashing" (myself I am including)... :oops: (sorry Claudio for that)

Sometimes users have no other way to define what and when something it is going wrong.
But it essential to understand what is exactly happening... poor info, hardest work for programmer to identify the problem. :mrgreen:

This is a very old matter, if what I suppose to be your case: how to get focus at Word's child window (spelling window).
See at internet many discussions about it.

I said in my previous message to Serge it could be implemented the SearchWindow function... but it's not easy and right.

This SearchWindow function works with real title of window and this can differs by other reasons: Word version, local language...

I got a reasonable result but I think is not the best way to do garantee the focus.
I've took mixed examples: IsExeRunning2 + SearchWindow with the difference it must be for CHILD window.

I also believe that Word spelling engine it's not the best way to check for control's speeling grammar check.
Sorry to say but I do not wish to spend more time in this... I would like to have our own spelling check.

I think my second option (suggested items) it's more practical and faster.

So test it and tell me if is working properly. For me It's ok here...
SpellCheck.rar
Source files only
(3.24 KiB) Downloaded 232 times
 
Gimme a return, please.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
serge_girard
Posts: 3162
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Text grammar check by Word's spelling

Post by serge_girard »

Thx, Pablo ! It is OK

I think BPD had the same 'problem' as I had. BPD: push 'clear desktop' and activate spellchecker and you'll see it worls.
There's nothing you can do that can't be done...
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: Text grammar check by Word's spelling

Post by bpd2000 »

Hi Pablo
I am on tour and can test after 2 days when I return to my office
Some time user can not explain properly the correction situation / may be in hurry when replying.
BPD
Convert Dream into Reality through HMG
Post Reply