Hello,
I am new here. I'm sorry if this is a nooby question. I was making a script on AppleScript, but it keeps on telling me the variable is undefined whenever I click on a dialog box button.
Here is the script. The line of question will have an arrow next to it.
Thanks! 
I am new here. I'm sorry if this is a nooby question. I was making a script on AppleScript, but it keeps on telling me the variable is undefined whenever I click on a dialog box button.
Here is the script. The line of question will have an arrow next to it.
Code:
tell application "Safari"
quit
end tell
set app_name to "QuickTime Player"
--do shell script "killall " & app_name
tell application "QuickTime Player"
activate
set volume 10
tell (new movie recording)
start
do shell script "say -v trinoids Virus activated"
set volume 10
do shell script "say -v trinoids All your Base are belong to us"
tell application "Finder"
activate
repeat 50 times
make new Finder window
end repeat
end tell
tell application "Safari"
open location "http://www.youtube.com/watch?v=oHg5SJYRHA0"
set volume 10
end tell
display dialog "Virus propagating.
Plan of action?" buttons {"Seek and Destroy Virus", "Self Destruct"}
stop
end tell
set MovieFile to (file of document of front window) as alias
close front window saving yes
end tell
if the button returned of result is "Self Destruct" then <====
tell application "System Events" to (sleep) and (stop) and application "Finder"
move MovieFile to desktop
set name of MovieFile to "LOL.mov"
else
set volume 10
stop and application "Finder"
move MovieFile to desktop
set name of MovieFile to "LOL.mov"
do shell script "say -v zarvox requesting authorisation for M,A,D, weapons strike"
do shell script "shutdown -h now" with administrator privileges
end if
Last edited by a moderator: