Saving Numbers File

I keep getting an error when I try to save a Numbers file.

Here’s my code:


tell application "Numbers"

set saveFileName to "pythonResults.numbers"
set destinationLocation to (path to desktop) & "PythonTest:" & saveFileName as string
save thisDocument in file destinationLocation

end tell

I keep getting this error message: The file “pythonResults.numbers” doesn’t exist.

Any help would be appreciated.

Hi,

destinationLocation is a list, because an alias (path to desktop) and a string cannot be concatenated.

Solution is to move as string :

set destinationLocation to (path to desktop as string) & "PythonTest:" & saveFileName

Ah, thanks. I haven’t had my AppleScript-fu on since 2012. Been a while, funny how much I miss working with it.