Re: Choose from list
Re: Choose from list
- Subject: Re: Choose from list
- From: Andy Wylie <email@hidden>
- Date: Mon, 06 May 2002 20:23:56 +1200
on 6/5/02 2:45 PM +1200: Stephen Swift wrote:
>
Thanks Paul. Much more elegant. I presume that there is no other option to
>
get what item number a certain value is in a list besides a repeat loop.
>
That would make the script even better - but I guess I'm just dreaming. :-)
>
set theList to {"Dialog Box 1", "Dialog Box 2", "Dialog Box 3", "Dialog Box
4"}
set optionList to {"Good Morning", "Good Afternoon", "Good Evening", "Good
Night"}
set someItem to choose from list theList
set AppleScript's text item delimiters to "pollywollydoodle"
set vTabStr to theList as string
set AppleScript's text item delimiters to (someItem's item 1)
set vTabStr1 to (vTabStr's text item 1)
set AppleScript's text item delimiters to "pollywollydoodle"
set x to count (vTabStr1's text items)
set AppleScript's text item delimiters to ""
optionList's item x
-- "Good
Night"
I prefer records :)
_____________________________ Andy
_______________________________________________
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.