Adobe 27510753 Scripting Guide - Page 102

Document XMP information., location:myBottomMargin

Page 102 highlights

94 Working with Documents in AppleScript Adobe InDesign CS2 Scripting Guide tell grid preferences set baseline start to 56 set baseline division to 14 set baseline grid shown to false set horizontal gridline division to 14 set horizontal grid subdivision to 5 set vertical gridline division to 14 set vertical grid subdivision to 5 set document grid shown to false end tell --Document XMP information. tell metadata preferences set author to "Olav Martin Kvern" set copyright info URL to "http:--www.adobe.com" set copyright notice to "This document is not copyrighted." set copyright status to no set description to "Example 7 x 9 book layout" set document title to "Example" set job name to "7 x 9 book layout template" set keywords to {"7 x 9", "book", "template"} set myNewContainer to create container item ¬ namespace "http://ns.adobe.com/xap/1.0/" path "email" set property namespace "http://ns.adobe.com/xap/1.0/" ¬ path "email/*[1]" value "[email protected]" end tell --Set up the master spread. tell master spread 1 tell page 1 set myMarginPreferences to margin preferences set myBottomMargin to (page height of document preferences of myDocument ¬ - (bottom of myMarginPreferences) set myLeftMargin to right of myMarginPreferences set myRightMargin to (page width of document preferences of myDocument) ¬ - (left of myMarginPreferences) make guide with properties {orientation:vertical, location:myRightMargin, ¬ item layer:layer "GuideLayer" of myDocument} make guide with properties {orientation:vertical, location:myLeftMargin, ¬ item layer:layer "GuideLayer" of myDocument} make guide with properties {orientation:horizontal, ¬ location:top of myMarginPreferences, ¬ item layer:layer "GuideLayer" of myDocument, fit to page:false} make guide with properties {orientation:horizontal, ¬ location:myBottomMargin, ¬ item layer:layer "GuideLayer" of myDocument, fit to page:false} make guide with properties {orientation:horizontal, ¬ location:myBottomMargin + 14, ¬ item layer:layer "GuideLayer" of myDocument, fit to page:false} make guide with properties {orientation:horizontal, ¬ location:myBottomMargin + 28, ¬ item layer:layer "GuideLayer" of myDocument, fit to page:false} set myLeftFooter to make text frame with properties ¬ {item layer:layer "Footer" of myDocument, ¬ geometric bounds:{myBottomMargin + 14, right of myMarginPreferences, ¬ myBottomMargin + 28, myRightMargin}} set contents of insertion point 1 of parent story of myLeftFooter ¬ to section marker set contents of insertion point 1 of parent story of myLeftFooter ¬ to Em space set contents of insertion point 1 of parent story of myLeftFooter ¬ to auto page number set applied character style of character 1 of parent story of ¬ myLeftFooter to character style "page_number" of myDocument set applied paragraph style of paragraph 1 of parent story of ¬ myLeftFooter to paragraph style "footer_left" of myDocument --Slug information. tell metadata preferences of myDocument set myEmail to get property ¬ namespace "http://ns.adobe.com/xap/1.0/" path "email/*[1]"

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184

94
Working with Documents in AppleScript
Adobe InDesign CS2 Scripting Guide
tell grid preferences
set baseline start to 56
set baseline division to 14
set baseline grid shown to false
set horizontal gridline division to 14
set horizontal grid subdivision to 5
set vertical gridline division to 14
set vertical grid subdivision to 5
set document grid shown to false
end tell
--Document XMP information.
tell metadata preferences
set author to "Olav Martin Kvern"
set copyright info URL to "http:--www.adobe.com"
set copyright notice to "This document is not copyrighted."
set copyright status to no
set description to "Example 7 x 9 book layout"
set document title to "Example"
set job name to "7 x 9 book layout template"
set keywords to {"7 x 9", "book", "template"}
set myNewContainer to create container item
¬
namespace "http://ns.adobe.com/xap/1.0/" path "email"
set property namespace "http://ns.adobe.com/xap/1.0/"
¬
path "email/*[1]" value "[email protected]"
end tell
--Set up the master spread.
tell master spread 1
tell page 1
set myMarginPreferences to margin preferences
set myBottomMargin to (page height of document preferences of myDocument ¬
- (bottom of myMarginPreferences)
set myLeftMargin to right of myMarginPreferences
set myRightMargin to (page width of document preferences of myDocument)
¬
- (left of myMarginPreferences)
make guide with properties {orientation:vertical, location:myRightMargin, ¬
item layer:layer "GuideLayer" of myDocument}
make guide with properties {orientation:vertical, location:myLeftMargin, ¬
item layer:layer "GuideLayer" of myDocument}
make guide with properties {orientation:horizontal,
¬
location:top of myMarginPreferences,
¬
item layer:layer "GuideLayer" of myDocument, fit to page:false}
make guide with properties {orientation:horizontal,
¬
location:myBottomMargin,
¬
item layer:layer "GuideLayer" of myDocument, fit to page:false}
make guide with properties {orientation:horizontal,
¬
location:myBottomMargin + 14,
¬
item layer:layer "GuideLayer" of myDocument, fit to page:false}
make guide with properties {orientation:horizontal,
¬
location:myBottomMargin + 28,
¬
item layer:layer "GuideLayer" of myDocument, fit to page:false}
set myLeftFooter to make text frame with properties
¬
{item layer:layer "Footer" of myDocument,
¬
geometric bounds:{myBottomMargin + 14, right of myMarginPreferences,
¬
myBottomMargin + 28, myRightMargin}}
set contents of insertion point 1 of parent story of myLeftFooter
¬
to section marker
set contents of insertion point 1 of parent story of myLeftFooter
¬
to Em space
set contents of insertion point 1 of parent story of myLeftFooter
¬
to auto page number
set applied character style of character 1 of parent story of
¬
myLeftFooter to character style "page_number" of myDocument
set applied paragraph style of paragraph 1 of parent story of
¬
myLeftFooter to paragraph style "footer_left" of myDocument
--Slug information.
tell metadata preferences of myDocument
set myEmail to get property
¬
namespace "http://ns.adobe.com/xap/1.0/" path "email/*[1]"