Re: Happy endings
Re: Happy endings
- Subject: Re: Happy endings
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 03 Oct 2004 08:03:45 -0700
Title: Re: Happy endings
On 10/3/04 7:38 AM, "Erik Ness" <email@hidden> wrote:
> Greetings,
>
> I know this is just a cosmetic tweak, but:
>
> I have a script that ends with a 'display dialog'. It's triggered by
> a DragThing button, and DragThing declares a timeout error when that
> dialog is on the screen too long. Is there a way in AppleScript to
> automatically press the OK button after a set period?
It's always a good idea to read the dictionary.
display dialog: Display a dialog box, optionally requesting user input (defined in: StandardAdditions.osax)
display dialog string -- the text to display in dialog box
[default answer string] -- the default editable text
[buttons list of string] -- a list of up to three button names
[default button number or string] -- the name or number of the default button
[with icon stop/note/caution] -- …or one of these system icons
[giving up after integer] -- number of seconds to wait before automatically dismissing dialog
Result: dialog reply -- a record containing the button clicked and text entered (if any)
See that 'giving up after' parameter? Try it. You can also use 'if gave up of result' if you need to:
Class dialog reply: Reply record for the ‘display dialog’ command
Properties:
button returned string [r/o] -- name of button chosen (empty if ‘giving up after’ was supplied and dialog timed out)
text returned string [r/o] -- text entered (present only if ‘default answer’ was supplied)
gave up boolean [r/o] -- Did the dialog time out? (present only if ‘giving up after’ was supplied)
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden