Applescript/Pages cannot find open document
This very simple script does not work:
tell application "Pages"
activate
tell the front document
name
end tell
end tell
All it has to do is give the name of the open document. It says, "Can't get document 1. Invalid index." And, yes, there is an open document.
This behavior has degraded. It worked a few weeks ago and then became increasingly more broken. It's the same with Numbers.
What happened? Is my Applescript corrupted?
MacBook Pro with Retina display, OS X Yosemite (10.10.5)