如何将applescript写入页面'09。我正在寻找一个脚本来实现正文文本的行间距。我写的程序。
tell application "Macintosh HD:Applications:iWork '09:Pages.app"
tell Untitled
get properties of paragraph styles
tell bodytext
set properties to justify
set line spacing to Double
end tell
end tell
end tell
答案 0 :(得分:1)
你走了:
tell application "Macintosh HD:Applications:iWork '09:Pages.app"
set thisDoc to front document
set line spacing of every paragraph style of thisDoc to 200
end tell
line spacing
的值以百分比表示,因此200
将导致双行间距。
编辑:但是,这会在文档中的任何位置设置行间距,而不仅仅是正文文本段落。如果你只想要它们,可以考虑循环遍历它们并逐个改变它们的段落样式:
repeat with p in paragraphs of thisDoc
set line spacing of p's paragraph style to 200
end repeat