Re: Buttons with Display Dialog
Re: Buttons with Display Dialog
- Subject: Re: Buttons with Display Dialog
- From: Skeeve <email@hidden>
- Date: Mon, 03 Dec 2007 12:49:52 +0100
Peter Baxter wrote:
Hi Kevin,
set myDialog to display dialog "Hello World" buttons {"Accept",
"decline"}
if myDialog is "Accept" then
--do something good
end if
You know what I don't like on this mailing list?
a) Getting no answer at all
b) Getting wrong answers
Peter: Did you ever test what you posted?
Here is a Code snippet where I implemented all possible 4 results. And I
tested!
try
set myDialog to display dialog "Hello World" buttons {"Accept",
"decline", "Cancel"} cancel button "Cancel"
if the button returned of myDialog is "Accept" then
return "You accepted!"
else
return "You declined!"
end if
on error errtxt number errnum
if errnum is -128 then
return "You canceled"
else
return errtxt & " occured"
end if
end try
_______________________________________________
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