Changing type style in STE

I have a short text in Scriptable Text Editor that contains somewords in parenthethes. I want to change the style of the words.

 tell application "Scriptable Text Editor"
     activate
        select word 11 of document 1
         set style of selection to italic.
  end tell

The above script works with one word. If I ask to select words 11 thru 14, it says the Handler can only handle single words. I’ve tried various modifications of the wording but can’t get it to work. I would really like to get something like the above to work also in Claris Works and/or Mariner Write.

Any suggestions?

Hi,

Try this:

tell application “Scriptable Text Editor”
activate
repeat with i from 11 to 14
set style of word i of document 1 to italic
end repeat
end tell

works with tex-edit plus