Re: Display dialog does nt work in OS X
Re: Display dialog does nt work in OS X
- Subject: Re: Display dialog does nt work in OS X
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 06 Apr 2002 08:31:53 -0800
On 4/6/02 4:44 AM, "Gerd" <email@hidden> wrote:
>
Hallo,
>
>
i recently changed from OS 9.1 to OS X 10.1.3 .
>
>
Now in all my scripts the display dialog commands does not work.
>
The dialogs are shown correctly but all the scripts take as an answer
>
the 'cancel' command, also if i am clicking the 'ok' or any other button.
>
>
Does anybody know what is wrong?
>
Can you describe the problem in more detail? I don't understand what the
problem is. You say the dialogs display correctly and will respond to
clicking any button.
Do you mean that if you don't specify any buttons that the "Cancel" button
is now the default button (highlighted) which activates when you press the
Return or Enter key, rather than the OK button? That is certainly odd. I
don't recall such a problem with AppleScript/Standard Additions 1.8.1, but
perhaps someone else could comment.
You could simply specify the buttons:
display dialog "Boo" buttons {"Cancel", "OK} default button 2
To be certain that "Cancel" will actually cancel no matter what language
your localization is (i.e. in Denmark you'd have to use the Danish word for
Cancel, I'm sure, which appears when you don't specify any buttons), add:
if button returned of result = "Cancel" then error number -128
Or you could download AppleScript/Standard Additions 1.8.2b3 from The
Developer web-page at Apple website (you have to join ADC free). Not only
does it work correctly, it now has built into the functionality that
specifying "Cancel" (in English) will cancel in all localizations. Or just
go back to not specifying buttons, so "Cancel" will always appear in the
local language and will cancel, but "OK" will be the default button as you
expect.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.