编程时出现AppleScript错误

编程时出现AppleScript错误,applescript,Applescript,我对编程还是新手,但我有一个AppleScript错误需要帮助。 我正在使用AppleScript创建恶作剧,但当我尝试压缩文件时,出现了此错误消息 应为“else”等,但找到脚本结尾 这是我的密码。请帮我修好这个!谢谢 display dialog "Virus Detected" buttons {"Shut Down", "Crash CPU"} default button 2 if the button returned of the result is "Shut Down" the

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

应为“else”等,但找到脚本结尾

这是我的密码。请帮我修好这个!谢谢

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
子句

如果(在else之前),则必须用一个结束符来平衡每一个