My script for the Mail app saves attachments from each message. It was working fine and suddenly started generating this error in macOS 10.14.6 Mojave:
--> error "To view or change permissions, select the item in the Finder and choose File > Get Info." number -10000
The script line that resulted in this error was:
save mail attachment id "2" of message id 33167 of mailbox "Trash Later" in "/Volumes/Backup/email attachments/ATT00001.jpg"
I tried changing the permissions of the target folder using "chmod 775" but no luck.
Apple's documentation has this cryptic description of the error:
-10000 The Apple event handler failed.
Any suggestions?