编程时出现 AppleScript 错误

AppleScript Error While Programming

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

Expected “else”, etc. but found end of script.

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

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

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

它们中的每一个都必须用 end if 来平衡(在 else 之前)