I'm trying to figure out how to read a file in using AppleScript. I'd like to read each line into a different list elements so that I can then copy the contents of each list element to the name field of tracks in iTunes. I've got it to read in as a list OK I think, but I don't know how to access individual lines in the list (or file). This is the code I've got so far:
tell application "Finder"
set Names to (read (choose file with prompt "Pick text file containing track names")) as list
display dialog Names
end tell
Now what I need to know how to do is reference just one line of "Names" at a time. Any help would be appreciated.
tell application "Finder"
set Names to (read (choose file with prompt "Pick text file containing track names")) as list
display dialog Names
end tell
Now what I need to know how to do is reference just one line of "Names" at a time. Any help would be appreciated.