Unfortunately that will also flag a match for things like "uncomfortable". Inserting:
set theText to paragraphs of theText
should fix it, given that the OP said each name would be in a paragraph of its own.
This turns out to be way easier, and also way more complicated, then I thought.
I was able to easily write a program that opens Textedit, gets all the text into a variable, and checks if filenames (folder or files) dragged onto the program exists in that document, using “if x contains y..."
However, my difficulty is this:
The way files are listed in the document, they have a version number appended onto the beginning of the name, and no extension. So I check to see if the filename, less the extension, has a match. The problem is, suppose the document contains the text:
“v01 Some file whatever”
And one of my files is called “Some file.aif”
It will flag as a match.
Looks like I will have a lot more work to do to get exact matches.
Jim Weisbin | C.T.O. | human | 138 Fifth Avenue | 3rd Floor | New York, NY | 10011 | (212) 352-0211 | (917) 375-2272 | Los Angeles Office | 2046 Broadway | Santa Monica, CA | 90404 | (310) 264-0211 telephone | www.humanworldwide.com Click here to view our online reel