Re: Choose from List & Return Item Number
Re: Choose from List & Return Item Number
- Subject: Re: Choose from List & Return Item Number
- From: "Nigel Garvey" <email@hidden>
- Date: Mon, 21 Jan 2008 22:04:05 +0000
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
NG
_______________________________________________
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