The simple solution used WSH script:
SpellCheck.vbs:
> ---------------------------------------------------------------
' command.name.17.*=SpellCheck
' command.17.*=wscript "$(SciteDefaultHome)\tools\SpellCheck.vbs"
' command.input.17.*=$(CurrentSelection)
'
command.mode.17.*=subsystem:windows,replaceselection:auto,savebefore:no,quiet:yes
' -----------------------------------------------------------------------
Option Explicit
Dim objWord, exit_code, sText, sResult
sText = WScript.StdIn.ReadAll
If len(sText) > 1 then
Set objWord = WScript.CreateObject("Word.Application")
objWord.WindowState = 2 'wdWindowStateMinimize
objWord.Visible = False
objWord.Documents.Add
objWord.Selection = sText
If Not
objWord.CheckSpelling(objWord.ActiveDocument.Range(0,objWord.Selection.End))
Then
If objWord.Options.CheckGrammarWithSpelling = True Then
objWord.ActiveDocument.CheckGrammar
Else
objWord.ActiveDocument.CheckSpelling
End If
sResult = objWord.ActiveDocument.Range(0,objWord.Selection.End)
If sResult <> sText Then
WScript.StdOut.Write sResult
Else
'if press "Skip"
exit_code = 1
End If
Else
MsgBox "Errors not found!", vbInformation, "SpellCheck"
exit_code = 1
end if
objWord.ActiveDocument.Close 0 'wdDoNotSaveChanges
objWord.Quit True
Set objWord = Nothing
Else
MsgBox "Please select text!", vbExclamation, "SpellCheck"
End If
WScript.Quit (exit_code)
> ---------------------------------------------------------------
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest