• 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
Faster List Checking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Faster List Checking


  • Subject: Faster List Checking
  • From: "Frank W. Walker" <email@hidden>
  • Date: Wed, 28 May 2003 14:15:16 -0400
  • Thread-topic: Faster List Checking

The recent discussion about lists makes me wonder if I could improve the speed of my latest script.
In my script, there are two lists, text delimited by ", ":
"errorlist" contains known instances of missing items (graphics).
"logolist" contains all items (graphics) which have previously been found.

The following lines check the list "errorlist" for the text item contained in the variable "graphic":

set AppleScript's text item delimiters to {", "}
repeat with i from 1 to (count text items in errorlist) --checks error list for current logo name
if text item i of errorlist = graphic then
set knownerror to "YES"
end if
end repeat
set AppleScript's text item delimiters to {""}


The next part checks the list "logolist" for the text item contained in the variable "graphic".
If it finds the text item, it sets the variable "templatename" to a certain string.


set AppleScript's text item delimiters to {", "}
repeat with i from 1 to (count text items in logolist)
if text item i of logolist = graphic then --checks logolist for previous use of graphic
set templatename to "LOGO" & graphic
exit repeat
end if
end repeat
set AppleScript's text item delimiters to {""}


Can I make these faster?

TIA
Frank
_______________________________________________
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.

  • Prev by Date: RE: Open application as hidden
  • Next by Date: Re: Faster List Checking
  • Previous by thread: Re: Newbie questions
  • Next by thread: Re: Faster List Checking
  • Index(es):
    • Date
    • Thread