Yes, that works. Which suggests that Mountain Lion Applescript doesn't play nice with the Satimage OSAX. ( I downloaded the latest version of Satimage, but that didn't help.) On Nov 13, 2012, at 5:57 PM, "Stockly, Ed" <[log in to unmask]> wrote: > -->>I have a script that goes through a humungous test file looking for > stuff. Simple version: > > Depending on what the "do some stuff with it" does, this might simplify > things. It definitely tells you if your keywords are in the part of bigfile > you're looking at. Don't know how big humungous is, but it works on a pretty > large file OMM. > > ES > > set keywords to {"foo", "bar", "Fred"} > set AppleScript's text item delimiters to {"whatever"} > set thePieces to text items of bigFile > repeat with onePiece in thePieces > set AppleScript's text item delimiters to keywords > set onePieceItems to text items of onePiece > if (count (onePieceItems)) > 1 then > -- (do some stuff with it) > end if > end repeat > > > On 11/13/12 1:15 PM, "Bill Steele" <[log in to unmask]> wrote: > >> I have a script that goes through a humungous test file looking for stuff. >> Simple version: >> >> set keywords to {"foo","bar","Fred"} >> set thePieces to splittext bigFile using "whatever" >> repeat with onePiece in thePieces >> repeat with oneWord in keywords >> if onePiece contains oneWord >> (do some stuff with it) >> end if >> end repeat >> end repeat