Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

campbellum

macrumors newbie
Original poster
Oct 19, 2015
5
1
I use this AppleScript to create a new Pages document with some standard titles and verbiage:

tell application "Pages"
activate
set myDoc to make new document with properties {document template:template "MyTemplate"}
set paragraph 1 of body text of myDoc to (current date as text)
end tell

The "set" is meant to write over a dummy line provided by the template and replace it with the date. However, the line is not changed. I have tried scripts that I found online, and they all have the same effect: the script refuses to modify text provided by the Pages template.
After the script exits, though, I can edit the line, so it's not read-only.

What is happening?
(Yosemite, Pages 5.6, Script Editor 2.7)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.