• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Buttons with Display Dialog
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Buttons with Display Dialog (From: Kevin Ballon <email@hidden>)

  • Prev by Date: Re: Buttons with Display Dialog
  • Next by Date: Re: delaying until I'm fully "logged in"
  • Previous by thread: Re: Buttons with Display Dialog
  • Next by thread: Re: Buttons with Display Dialog
  • Index(es):
    • Date
    • Thread