View previous topic :: View next topic |
Author |
Message |
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Aug 15, 2002 2:05 pm Post subject: Forum Post Spell Checker |
|
|
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 |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Aug 15, 2002 2:24 pm Post subject: |
|
|
Nice idea FF,
For those who don't have a spell checker, here's an IE5
(or later) plugin:
http://www.iespell.com/
Cheers, Mac _________________ 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 |
|
|
|
|
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
|
|