applescript?

1 reply [Last post]
Offline
Joined: Nov 19 2004
Posts: 5

set thetext to "Hi, would you like to surf the net?"
display dialog thetext buttons {"NO!", "Indeed I would"}

if the button returned of the result is "NO!" then
set thetext to "Ok, so you won't surf the net. Do you want to write?"
display dialog thetext buttons {"i kan't spel", "Yes"}
end if

if the button returned of the result is "Indeed I would" then
tell application "Safari" to activate
end if

How do I get it so the last bit responds to the first bit instead of the second bit? Please help me!

__________________

i was ill when god handed out brains

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Tiger G5 Kid's picture
Offline
Joined: Dec 20 2003
Posts: 134
Here you go!

set thetext to "Hi, would you like to surf the net?"
display dialog thetext buttons {"NO!", "Indeed I would"}

if the button returned of the result is "NO!" then
set thetext to "Ok, so you won’t surf the net. Do you want to write?"
display dialog thetext buttons {"i kan’t spel", "Yes"}
else if the button returned of the result is "Indeed I would" then
tell application "Safari" to activate
end if

__________________

(\ /)
(O.o)
(> <)
This is Bunny. Copy Bunny into your signature to help him on his way to world domination.