applescript to duplicate open numbers file
AppleScript is nothing like any other language I have used.. cant figure out what should be so simple.
I am just trying to make a script that would create a local back up of an open document. ( I will reopen the original iCloud version afterwards, but cant get past the saveas)
I tried to use "SAVE <document> IN <Path>" but couldn't figure it out, switched to "DUPLICATE" and am still stuck...
I failed so many times on SAVE, I tried DUPLICATE thinking might be better.
you can see I have tried multiple different things, cant figure out why it keeps failing with different errors that I don't understand. (I commented the error first then the line that throws that error)
These same kinds of things came up with the ability to ?"Save <document> in <path>"
tell application "Numbers"
set filePath to file of front document
set the_name to name of front document
set theNewFilePath to "Macintosh HD:Users:MyName:Documents:backups:numbers:"
--cant make the <filepath> into type location specifier... its literally saying use the
-- front document and filepath came from another script
-- that makes it for me that i found online and it seems to be the riught format from others
--duplicate front document to theNewFilePath
--Cant get Document whose name is... but it got the name from the front document?
--duplicate (the document whose name is the_name) to theNewFilePath
--Cant make <filename> into type specifier ... what the heck is this specifier type?
--duplicate the_name to theNewFilePath
end tell
Any help would be greatly appreciated
Jason
iMac 27″ 5K