I’m trying to use the Finder’s new “Create archive” command with the new GUI scripting support through “System Events.” In this case, I’m typing:
tell application "Finder" select folder "Hard Drive:Backups" activate tell application "System Events" tell process "Finder" tell menu "ContextMenu" click menu item "Create Archive of "Backups"" end tell end tell end tell end tell
Every time, I get the same error message in Script Editor:
System Events got an error: NSReceiverEvaluationScriptError: 4
What does this mean? This happens if I use the command in the File menu, too. I realize this could be done with a gzip shell script or something, but the Finder’s archiving is so convenient… at least, it could be.
Thanks for any help you can give!