REVO2700SpellCheckDemo2HyvJSpell Check Demo UV Ue Ur Ud Ua Un UVerdana WVerdana UVerdanacGlx2TimeStamp checksumcREVGeometryCachestackID1016 @JcREVGeometryCacheIDs12160717607831004121607179058210121216071928255101512160719299821016121607176905110071216071779707100912160717952151014cREVGeometrycachetotal7order  Text)` FcGlx2TimeStamp checksum cREVTable currentview cREVGeneral revUniqueID 1216071760783  .Here is some smaple texxt, with a few errers. 'I make a lot of mistacks when typping. 9Occassionally is a word that I have great problums with. `!D Errors)p6--> all handlers on mouseUp put the selectedtext of me into tWord if tWord is empty then exit to top -- get suggestions for this word put "guess spelling of word " & quote & tWord & quote into tScript do tScript as AppleScript put the result into tGuess -- no need to check if XSpell is already installed, as this field will be empty unless it has already worked if tGuess is empty then put "No suggestions" into tGuess else -- format the returned list into one word per line -- {"Sample", "maple", "Staple"} replace quote & ", " & quote with cr in tGuess replace quote with "" in tGuess delete first char of tGuess delete last char of tGuess end if put tGuess into fld "Suggestions" end mouseUp  FcGlx2TimeStamp checksum{PA. cREVTable currentview cREVGeneral revUniqueID 1216071769051  `!D  Suggestions)` FcGlx2TimeStamp checksum cREVTable currentview cREVGeneral revUniqueID 1216071779707  `/!DCheck SpellingE o--> all handlers on mouseUp put fld "Text" into tText put empty into fld "Errors" put empty into fld "Suggestions" put listBadWords(tText) into tBadCharNumbers if tBadCharNumbers is empty then exit to top -- no incorrect spellings put empty into tBadWords repeat for each line L in tBadCharNumbers put item 1 of L into tStartChar put item 2 of L into tEndChar if tStartChar is not a number or tEndChar is not a number then next repeat put char tStartChar to tEndChar of tText into tNewWord put tNewWord & cr after tBadWords end repeat delete last char of tBadWords put tBadWords into fld "Errors" end mouseUp -- return a list of all characters that have been spelt incorrectly in the supplied text -- the list is one word per line, with starting character, ending character -- function listBadWords pText replace quote with "'" in pText put "check spelling in text " & quote & pText & quote into tScript do tScript as AppleScript put the result into tErrorList -- check to see if the XSpell addition is installed OK if tErrorList = "compiler error" then answer error "Please install the XSpell scripting addition first!" exit to top end if if tErrorList is empty then return empty -- no errors -- gives this sort of return - linefeeds added by me -- {{word:"smaple", starting at:14, ending at:19, guesses:{"sample", "maple", "staple"}}, -- {word:"shuld", starting at:327, ending at:331, guesses:{"should", "shelled", "shilled"}}} -- now process the AppleScript error list into something easier for Rev to handle replace "}, {" with cr in tErrorList delete first char of tErrorList delete last char of tErrorList -- retrieve the word number for each mistake. put empty into tBadCharNumbers repeat for each line L in tErrorList -- get the character where the mis-spelled word starts & ends set the itemdel to comma put item 2 of L into tStart put item 3 of L into tEnd set the itemdel to ":" put last item of tStart into tStart put last item of tEnd into tEnd put tStart & comma & tEnd & cr after tBadCharNumbers end repeat delete last char of tBadCharNumbers return tBadCharNumbers end listBadWords Hm~2cGlx2TimeStamp checksum$ӄ@蟝Z55 cREVGeneral revUniqueID 1216071790582  Label Field  cGlx2TimeStamp checksum cREVTable currentviewText to be checked: cREVGeneral revUniqueID 1216071795215 Text to be checked:  Label Field  pcGlx2TimeStamp checksum cREVTable currentviewIncorrect words: cREVGeneral revUniqueID 1216071928255 Incorrect words:  Label Field  dcGlx2TimeStamp checksum cREVTable currentview Suggestions: cREVGeneral revUniqueID 1216071929982 Suggestions: