Applescript新手!
语法似乎没问题,但我收到了15226错误。我该如何解决这个问题?
当我运行此脚本时,我会收到"回复" (下):
tell application "Finder"
activate
exists file "Macintosh HD:Applications:MAMP:htdocs:"
--> true
duplicate file "Macintosh HD:Applications:MAMP:htdocs:" to file "RAID:BACKUP:" with replacing
--> current application
--> error "The operation can’t be completed because some items had to be skipped. “htdocs”" number -15266
display dialog "Error: -15266. The operation can’t be completed because some items had to be skipped. “htdocs”" buttons {"OK"} default button 1
--> {button returned:"OK"}
回复:
{{1}}
答案 0 :(得分:0)
我想你错过了使用on错误处理程序。你必须决定你自己的错误(脚本中的其他地方)并通过“错误号xxx”调用错误处理程序 以下是来自Apple网站的示例的详细说明:Apple developper error handler