• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Faster List Checking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • RE: Faster List Checking
      • From: Jeffrey Mattox <email@hidden>
  • Prev by Date: Re: Tex-Edit: crashes selecting to EOF
  • Next by Date: Re: Need a faster Find Duplicates Routine
  • Previous by thread: Re: Faster List Checking
  • Next by thread: RE: Faster List Checking
  • Index(es):
    • Date
    • Thread