编程时AppleScript错误

时间:2016-03-03 04:21:15

标签: applescript

我还是编程的新手,但我有一个需要帮助的AppleScript错误。 我正在使用AppleScript创建一个恶作剧,但当我尝试压缩文件时出现此错误消息。

  

预期“其他”等,但发现脚本结束。

这是我的代码。请帮我解决这个问题!谢谢!

display dialog "Virus Detected" buttons {"Shut Down", "Crash CPU"} default button 2
if the button returned of the result is "Shut Down" then
    beep 10
    display dialog "Virus Downloaded. Commencing Virus Deletion Process. Shutting Down"
    say "Virus Deletion Process FAILED. Virus Downloaded. Shut Down Has Been Overrided"
    display dialog "All Systems Has Been Hacked. Computer Is Now Overloading"
    display dialog "Passwords Have Been Hacked" buttons {"Abort"} 
    if the button returned of the result is "Abort" then
    display dialog "About Has Been Overrided. Passwords Are Now Uploading" buttons {"Cancel"}
    if the button returned of the result is "Cancel" then
    display dialog "Overrided. Uploading Complete. Deleting ALL Files From Main Data Base."
    say "Deletion Complete"
    display dialog "Shutting Down"
    tell application "Finder" to shut down  
else
    beep 10
    display dialog "Virus Downloaded Successfully. Computer Has Been Hacked"
    say "Virus Has Hacked Into The Motherboard"
    display dialog "Deleting All Files. Restoring From Backup"
    say "No Backups Were Found"
    display dialog "Deleting ALL Data. Computer Is Now Crashing. Shutting Down"
    tell application "Finder" to shut down
end if

1 个答案:

答案 0 :(得分:1)

在第8行和第10行中有两个if子句。

每个必须与end ifelse之前)

平衡