Allowed coercions
Syntaxset myString to "Styled string" as Styled Text DescriptionStyled Text is a string that can but does not have to contain font and style information. Styled Text has all of the elements and properties of a string. In fact, the class of styled Text is string. This data type also has a length property, which returns the number of characters in the string. Styled Text strings have character, paragraph, text, and word properties. Some word-processing applications, such as AppleWorks, return the styled-text value when you get the text from a document. The various font and style characteristics of Styled Text are incorporated into the string, but you cannot change them with built-in AppleScript code (as in set font of styledTextVar...). In addition, you can coerce strings back and forth between Styled Text and string. But a literal string ("I am a string") that is coerced to Styled Text does not actually have any style or font information; it is just plain text. |