forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Forum Post Spell Checker

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Aug 15, 2002 2:05 pm    Post subject: Forum Post Spell Checker Reply with quote

This script uses Microsoft Word to check the text, but it could be modified to use another program. This script does not work quite right, so minor/major adjustments may be necessary.

Code:
rem **************************
rem * Script by FreezingFire *
rem *    Use at own risk     *
rem **************************
title Spell Checker
clipboard clear
rem -- Path to Microsoft Word or Equivalent --
%%wordpath = C:\Program Files\Microsoft Office\Office\WINWORD.EXE
rem -- Title of Word Window --
%%wordtitle = Document1 - Microsoft Word
rem -- Title of Spell Check window --
%%spellcheck = Spelling and Grammar: English
rem -- Hotkey for spell check
%%spellkey = F7
rem -- Gets the active window --
%%activewin = @winactive(n)
rem -- Copy selected text --
window send,%%activewin,@ctrl(c)
rem -- Create LIST 1 for comparison later --
list create,1
list paste,1
rem -- Opens Word --
shell open,%%wordpath
rem -- Wait until Word Opens --
repeat
wait .01
until @winexists(%%wordtitle)
rem -- Paste text into word window --
window send,%%wordtitle,@ctrl(v)
rem -- Launch spell check --
window send,%%wordtitle,@key(%%spellkey)
rem -- Wait until spell check window closes --
while @winexists(%%spellcheck)
repeat
wait .01
until @not(@winexists(%%spellcheck))
wend
rem -- Close info box --
if @winexists(Microsoft Word)
window send,Microsoft Word,@cr()
end
rem -- Clear the clipboard --
clipboard clear
rem -- Get corrected text into clipboard --
window send,%%wordtitle,@ctrl(a)
window send,%%wordtitle,@ctrl(c)
rem -- Compare lists to see if "Apply Changes?" box is necessary --
list create,2
list paste,2
if @not(@equal(@text(1),@text(2)))
if @ask(Apply changes?)
rem -- If so, paste corrected text --
window activate,%%winactive
window send,%%winactive,@ctrl(v)
end
end
rem -- Close Word --
repeat
window close,%%wordtitle
rem -- Close "Save Changes" dialog (say no by pressing "n")
window send,Microsoft Word,@chr(78)
until @not(@winexists(%%wordtitle))
rem -- Exit --
exit

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Aug 15, 2002 2:24 pm    Post subject: Reply with quote

Nice idea FF, Wink

For those who don't have a spell checker, here's an IE5
(or later) plugin:

http://www.iespell.com/

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group