Language Guide

APPENDIX B
Scriptable Text Editor Dictionary
About Text Objects 317
underlined, shadowed, and bold, then after the Set command, word 1 is
underlined and italicized.
In the second example, the styles specified in the On Styles property are
added to the active styles of word 1. Styles that are not specified remain the
same. For example, if word 1 is originally underlined and shadowed, then
after the Set command, word 1 is italicized, underlined, shadowed, and bold.
In the third example, the styles specified in the list are added to the active
styles of word 1. Styles that are not specified remain the same. For example,
if word 1 is originally underlined and shadowed, then after the Set
command, word 1 is italicized, underlined, shadowed, and bold.
In the fourth example, the style specified in the command is added to the
active styles of word 1. All other styles remain the same. For example, if
word 1 is originally underlined, shadowed, and bold, then after the Set
command, word 1 is italicized, underlined, shadowed, and bold.
When you set the style of a text object, if you include the same style constant in
both the On Styles property and the Off Styles property, the Scriptable Text
Editor returns the error Bad data.
When setting text styles, you can use a special constant—plain—to specify
that the text object is to be plain, that is, have no text styles. If you include
constants other than plain in the On Styles property, the Scriptable Text Editor
ignores the other constants. If you include plain in the Off Styles property, the
Scriptable Text Editor returns the error Bad data.
AppleScript and Non-Roman Script Systems B
A script system is a collection of system software facilities that allow for the
visual representation of a particular writing system. Script systems include
Roman, Japanese, Hebrew, Greek, and Thai. Each script system has a corre-
sponding script code, a constant used, for example, to identify the script
system in which some text was prepared. AppleScript and the Scriptable Text
Editor can handle text prepared in a variety of script systems, provided the
appropriate software is installed on your computer.
A character in an AppleScript string or a Scriptable Text Editor document takes
up either 1 byte or 2 bytes, depending on the script system the character
belongs to. Thus, the size in bytes of a text object may differ from the number
of characters it contains.