RE: Faster List Checking
RE: Faster List Checking
- Subject: RE: Faster List Checking
- From: Ken Tozier <email@hidden>
- Date: Wed, 28 May 2003 22:05:30 -0400
Since you're saving your "lists" as strings in the properties
"logolist" and "errorlist" you can eliminate looping entirely by just
changing AppleSctipt's text item delimiters to the info you are
searching for and count the resultant parts. If there's more than one,
the data was in the list.
For example:
set logolist to "joe, jill, jim, pete, bobo, etc..."
set AppleScript's text item delimiters to "jim, "
yeilds -> "joe, jill, " and "pete, bobo, etc..."
if (count text items of logolist > 1)
item was in list
else
item wasn't in list
end
--reset text item delimiters here
No looping necessary!
KT
_______________________________________________
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.