applescript?

2 posts / 0 new
Last post
Offline
Last seen: 19 years 10 months ago
Joined: Nov 19 2004 - 04:27
Posts: 5
applescript?

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!

Tiger G5 Kid's picture
Offline
Last seen: 18 years 9 months ago
Joined: Dec 20 2003 - 10:38
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

Log in or register to post comments