On mircscripts.org, I have been discussing a spell checker which interacts with MS Word. A person nicknamed Online came up with this alias:
> Is it possible to retrieve suggestions to certain words? :-)
> How do you specify dictionary etc?
Hi, this is the best alias i could come up with
alias spell {
window -h @@
var %a = aline @@
%a Set objWord = CreateObject("Word.Application")
%a objWord.Visible = True
%a objWord.Documents.Add
%a objWord.ActiveDocument.Content = $+(",$remove($1-,\,"),")
%a objWord.ActiveDocument.CheckSpelling
%a Set fso = CreateObject("Scripting.FileSystemObject")
%a Set f = fso.OpenTextFile("temp.txt", 2, True)
%a f.Write objWord.ActiveDocument.Content
%a objWord.ActiveDocument.Close False
%a objWord.Application.Quit True
savebuf @@ temp.vbs
close -@ @@
.comopen run WScript.Shell
.comclose run $com(run,Run,3,bstr,wscript temp.vbs,uint,5,bool,true)
var %n = $read(temp.txt,t)
.remove temp.txt
.remove temp.vbs
return %n
}
If i find any other idea i'll inform you.
- Online
Now, I'm wondering if anyone else might have something to contribute regarding this matter. How do you for example retrieve suggestions, synonyms. How do you specify dictionary etc.
Any help is appreciated.