Re: Buttons with Display Dialog
Re: Buttons with Display Dialog
- Subject: Re: Buttons with Display Dialog
- From: Michelle Steiner <email@hidden>
- Date: Sun, 2 Dec 2007 14:36:38 -0700
On Dec 2, 2007, at 1:58 PM, Kevin Ballon wrote:
I know how to display a dialog with buttons saying "Accept" and
"Decline"
for example....
display dialog "hello world" buttons ["Accept", "Decline"]
but how do I trigger an action when the user clicks accept? In other
words,
how do I get applescript to recognize that "Accept" has been
clicked, then perform "insert action here".
set theReply to button returned of (display dialog "Do you accept or
decline?" buttons {"Accept", "Decline"})
set suffix to "d"
if theReply is "Accept" then set suffix to "ed"
display alert "You " & theReply & suffix
-- Michelle
--
A hula hoop with a nail in it is a navel destroyer. -- Joe Parks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden