• 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
Simple Display Dialog confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Simple Display Dialog confusion


  • Subject: Simple Display Dialog confusion
  • From: Gary Thompson <email@hidden>
  • Date: Thu, 17 Jul 2008 14:11:34 -0400

Hello,

Can someone tell me how to get the 'button returned' from the display dialog?

set prompt to "Enter Date to import (MM/DD/YYYY)"
set mydate to current date
set today to (month of mydate as integer) & "/" & day of mydate & "/" & year of mydate
set today to text returned of (display dialog prompt default answer today as string buttons {"Cancel", "OK"} default button 2)

This does not seem to work:
if button returned is "Cancel" then
-- exit
else
--do stuff
end if

Thanks, Gary
 _______________________________________________
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

  • Follow-Ups:
    • Re: Simple Display Dialog confusion
      • From: Robert Poland <email@hidden>
    • RE: Simple Display Dialog confusion
      • From: Rick Gordon <email@hidden>
  • Prev by Date: Re: Finding the focused UI element
  • Next by Date: RE: Simple Display Dialog confusion
  • Previous by thread: Re: Finding the focused UI element
  • Next by thread: RE: Simple Display Dialog confusion
  • Index(es):
    • Date
    • Thread