Re: Simple Display Dialog confusion
Re: Simple Display Dialog confusion
- Subject: Re: Simple Display Dialog confusion
- From: Robert Poland <email@hidden>
- Date: Thu, 17 Jul 2008 13:10:11 -0600
On Jul 17, 2008, at 12:11 PM, Gary Thompson wrote: 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
Gary,
The block "if button returned is "Cancel" then" isn't needed.
If you click the "Cancel" button the script quits.
Why don't you just replace the whole if block with "--do stuff"
Bob Poland - Fort Collins, CO
|
_______________________________________________
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