It is a good sign that Pages 5.2 reintroduces some serious Applscript support. But I have noticed some issues.
1. Consider the declaration
set dateParagraph to make new paragraph
"make new" is still documented in the Pages dictionary, but it returns this error
Pages got an error: Don't know how to create TMAScriptTextStorage
Why?
2. SImilarly, directives such as
set alignment of dateParagraph to right
fail with the same error, though they used to work.
3. The directive "save" is documented in a way that is similar to what was available in 4.3. But consider this fragment:
save currentDocument in file (mobileFolder & fileName)
expands correctly to
save "Doe, John 3 April 2014.pages" in file "Macintosh HD:Users:MyName:Library:Mobile Documents:com~apple~Pages:Documents:Doe, John 3 April 2014.pages"
But results is this error:
error "Pages got an error: Can’t make \"Doe, John 3 April 2014.pages\" into type specifier." number -1700 from "Doe, John 3 April 2014.pages" to specifier
Why?
the "make new paragraph" is highlighted.