[Macpartners] macOS Sierra: breaks 'close' in applescript

Duncan S Kincaid dsk at mit.edu
Thu Dec 29 12:35:29 EST 2016


lars (cc macpartners)

I hope this finds you well.

I seldom have anything to do with AppleScript as its gotten plenty of non-love from Apple over the years.
That said, on the rare occasion it is needed.

ISSUE:
The ‘close’ action appears to be broken in macOS 10.12 (it is fine under OS X 10.11).
The example below is true for all tested applications, not just TextEdit.

1. open TextEdit and create new file without saving
2. the following applescript command will fail

tell application "TextEdit"
	close document 1 saving yes saving in POSIX file "/Users/dsk/Desktop/WTF.txt"
end tell

ERROR:
"TextEdit got an error: AppleEvent handler failed." number -10000

The above identical script runs fine under OS X 10.11.

Is this a known bug? if not, i’ll report it.
(i can’t seem to search bug submittals with my apple developer ID)

thanks
dk


|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
duncan kincaid
cron | mit school of architecture and planning







More information about the Macpartners mailing list