2017

Table Of Contents
CONCEPTS
The set statements above are comparable to choosing Font, Size,
Leading, and Alignment from the Style menu.
The four set events reference the entire story by index [1]. The font, size,
leading, and justification properties of the story are set.
CREATE A COLORED DROP CAP
tell paragraph 1 of story 1 of text box 2
set drop cap characters to 1
set drop cap lines to 3
set color of character 1 of word 1 to "Blue"
end tell
CONCEPTS
The statements above are similar to checking Drop Cap in the Formats
tab of the Paragraph Attributes dialog box. The color Blue is then applied
to the drop cap character.
The
tell
statement references the first paragraph of the story in the second
text box; the objects are all referenced by index.
The first
set
event specifies that the first character will be a drop cap.
The second
set
event specifies that it will be a three-line drop cap.
The third
set
event references the drop cap, which is the first character of
the rst word; both are referenced by index [1]. The color property is changed
to Blue.
CREATE AN INITIAL CAP
tell last paragraph of story 1 of text box 2
set color of character 1 of word 1 to "Blue"
set size of character 1 of word 1 to 28
CONCEPTS
The lines above are similar to creating a decorative initial cap with
local formatting.
The
tell
statement references the last paragraph of story in the second text box.
The story and text box are referenced by index; the paragraph is referenced by
relative position.
The two
set
statements reference the first character of the first word; they are
referenced by index. The color property is changed to Blue and the size property
is changed to 28.
SCRIPT WRITING SAMPLE
A GUIDE TO APPLE EVENTS SCRIPTING
|
25