Re: Choose from List & Return Item Number
Re: Choose from List & Return Item Number
- Subject: Re: Choose from List & Return Item Number
- From: Rick Gordon <email@hidden>
- Date: Mon, 21 Jan 2008 14:58:37 -0800
I came to the same conclusion. That's just what I wound up doing.
------------------
On 1/21/08 at 10:04 PM +0000, Nigel Garvey wrote in a message entitled
"Re: Choose from List & Return Item Number":
>Rick Gordon wrote on Mon, 21 Jan 2008 04:44:21 -0800:
>
>>Is there some variant on the Choose from List routine from Standard
>>Additions that would allow the user to choose from a list and return the
>>item number of the chosen entry, rather than the item as a string or
>>integer?
>
>Depending on the circumstances, you might find it convenient to include
>the numbers in the choices:
>
> set choice to (choose from list {"1. Yes", "2. No", "3. Dunno"} with
>prompt "Do you like this method?")
> if (choice is false) then error number -128
> set choiceNumber to (word 1 of item 1 of choice) as integer
--
___________________________________________________
RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________
WWW: http://www.shelterpub.com
_______________________________________________
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