Script won't work like I want...

mswens000

Registered
I'm trying to make a string of dialog boxes that open a different box depending on which button you click. Answering the left button (yes) for each box does the string i want. when you start answering with the other button it skips boxes or goes to the other button's answer. Any suggestions would be appreciated.
Here's my script:

set q1 to display dialog "I am a computer, and I wish to speak with you." buttons ["Sure I'll talk to you", "No way man"]
set a1 to button returned of q1
if a1 is equal to "Sure I'll talk to you" then set q2 to display dialog "Why thank you for speaking with me." buttons ["Continue"]
set a2 to button returned of q2
end
if a2 is equal to "Continue" then set q3 to display dialog "I want you to prove to me that you will keep this a secret." buttons ["Yes", "No"]
set a3 to button returned of q3
if a3 is equal to "Yes" then set q4 to display dialog "Good... but you must now go find me some uranium" buttons ["Accept mission", "Decline"]
set a4 to button returned of q4
if a4 is equal to "Accept mission" then set q5 to display dialog "Good." buttons ["..."]
set a5 to button returned of q5
if a5 is equal to "..." then end
if a4 is equal to "Decline" then set q6 to display dialog "You broke your promise, you will now be terminated." buttons ["Uh-oh"]
set a6 to button returned of q6
if a6 is equal to "Uh-oh" then set q9 to display dialog "You have 3 days to reconsider." buttons ["..."]
set a9 to button returned of q9
if a9 is equal to "..." then end
end
if a3 is equal to "No" then set q7 to display dialog "Very well then, you may have just made the worst decision in your life." buttons ["Continue"]
set a7 to button returned of q7
if a7 is equal to "Continue" then end
end
if a1 is equal to "No way man" then set q8 to display dialog "I'm dissappointed, good bye." buttons ["Uhhh"]
set a8 to button returned of q8
if a8 is equal to "Uhhh" then end
end
 
Top