Re: My Worrisome Lists :-)
Re: My Worrisome Lists :-)
- Subject: Re: My Worrisome Lists :-)
- From: "Marc K. Myers" <email@hidden>
- Date: Mon, 04 Feb 2002 12:27:18 -0500
- Organization: [very little]
>
Date: Sun, 03 Feb 2002 20:01:57 -0500
>
Subject: My Worrisome Lists :-)
>
From: Stephen Swift <email@hidden>
>
To: AppleScript <email@hidden>
>
>
To sum it up. My problems are:
>
1) I can't use strings as records.
>
2) I can't find the item # of an item w/out using a repeat loop
>
3) I can't find out if an item is contained in a sub-list w/out using a
>
repeat loop.
If you're not adverse to using a scripting addition, problems #2 & #3
are easily solved using "collect items of" from the Akua Sweets package.
It returns a list of the indices of all items in the target list that
match a given string. If there are sub-lists it will return the indices
of sub-lists with a match on the first item. If the data is going to be
somewhere other than the first item of a sub-list there is an optional
parameter that allows you to specify which item of a sub-list to test.
Unfortunately it is case-sensitive, so you'd have to "normalize" your
search strings before running the compare if there are case differences.
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[2/4/02 12:26:47 PM]