Question: Applescript and Numbers saving/exporting issue after updating to OS Sierra 10.12.2
Hi, I made an applescript that generates a new numbers file from scratch, saves it in .numbers format and then exports it to pdf on a separate folder. It worked flawlessly on OS Sierra 10.12.1, but after updating on dec 27 2016 to 10.12.2 it gives the following error:
The document “Untitled” could not be saved as “my_custom_file_name.numbers”. You don’t have permission.
To view or change permissions, select the item in the Finder and choose File > Get Info.
When I removed the .numbers format saving part of the script to just leave the pdf export section, there is no error (no file being saved as .numbers triggering it of course) but there is also no pdf being exported and does not show any error for that one)
This is the portion of the script that I use for the saving/export for your reference:
set the defaultDestinationFolder to (path to me) as string
set documentName to "my_custom_file_name"
set exportFileName to documentName & ".numbers" as string
set the targetFileHFSPath to (defaultDestinationFolder & "Numbers versions folder:" as string) & exportFileName
save front document in file targetFileHFSPath
set exportFileName to documentName & ".pdf" as string
set the targetFileHFSPath to (defaultDestinationFolder & "PDF versions folder:" as string) & exportFileName
export front document to file targetFileHFSPath as PDF
I think this is an issue of OS Sierra 10.12.2 as it worked well before it.
The numbers version is 4.0.5 (4052)
Any ideas for a work around, and how to report this to apple so they can fix it on a future release? (I already tried going to http://bugreport.apple.com/ but for some reason it does not recognize my apple ID...)
Thanks for your help in advance.
MacBook Pro with Retina display, macOS Sierra (10.12.2), Numbers v4.0.5 (4052)