• 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
Re: Giving up a dialog after a few seconds
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Giving up a dialog after a few seconds


  • Subject: Re: Giving up a dialog after a few seconds
  • From: Hanaan Rosenthal <email@hidden>
  • Date: Mon, 24 Jan 2005 21:36:58 -0500

Hi,

The 'choose from list' command does not support a 'giving up' parameter.
You have two choices I can think of:

1. Create a small app in AppleScript Studio with one window that has a list of items to choose from.
This will require you to launch an app just for that one dialog.


2. Display a dialog with the following text (assuming for the example that the list chooses an ice-cream flavor):

display dialog "Should I choose a flavor for you, or would you like to choose?" buttons {"You choose", "I choose"}¬
default button "I choose" giving up after 4
if gave up of result or button returned of result is "You choose" then
set the_flavor to some_flavor
else
set the_flavor to choose from list flavor_list
end if


This way you are sure that the user will make a choice, and if the user is not there, the computer makes the choice 4 seconds after.

Good luck,
Hanaan

On Jan 21, 2005, at 6:13 AM, Kumar Shailove wrote:

Hi list,

In the display dialog event when we write

Display dialog "XYZ" giving up after 4

Dialog automatically disappears after 4 seconds.

I want to do it for

Choose from list.
I want that if user doesn't select for a number of seconds, a default
value to get automatically selected and the dialog get disappear.

How can I do that?

TIA.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ 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
References: 
 >Giving up a dialog after a few seconds (From: "Kumar Shailove" <email@hidden>)

  • Prev by Date: executing blocks of code
  • Next by Date: Re: make a new worksheet in Excel 2004
  • Previous by thread: Giving up a dialog after a few seconds
  • Next by thread: Simple Addition
  • Index(es):
    • Date
    • Thread