Re: loop to build a list?
Re: loop to build a list?
- Subject: Re: loop to build a list?
- From: Duncan Cowan <email@hidden>
- Date: Tue, 18 Feb 2003 12:35:24 +1100
I believe that this should work
set theList to {} -- your list
set AppleScript's text item delimiters to "{" -- Check out lines of
file starting with open bracket
set i to text items of extContent -- for each line
repeat with foundString in i -- repeat loop
if foundString contains "ImageSaver" then -- further narrowing
selection
set AppleScript's text item delimiters to " " -- break into
"words"
set gotIt to {text item 8 of foundString}
log gotIt -- Here gotit has the value I want
end if
set end of theList to gotIt -- add item to end of list
end repeat
From: James Burns <email@hidden>
Date: Mon, 17 Feb 2003 20:10:17 -0500
To: email@hidden
Subject: loop to build a list?
I'm trying to extract information from a formatted text file, and what
I want to end up with is a list of the items extracted. Is there a good
generalized routine for accumulating results into a list while
repeating?
_______________________________________________
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.