Here's one off-the-cuff idea, dunno how it will stack up.

## create an array that looks like
## array['word1'] => 1, array['word2'] => 2, etc
repeat for each item W in wordList
   put wordNum into wordArray[W]
end repeat

## loop through sentences
repeat for each line l in tSentences
   put 1 into tOffset

   ## check each word
   repeat for each word tWord in l

      ## quick array check to see if we want this word
      ## note: "it" now contains the number of the word we found
      get wordArray[tWord]
      if (it is not empty) then put tOffset&comma after tResultLine

      add 1 to tOffset
   end repeat
if (tResultLine is not empty) then put (char 1 to -2 of tResultLine)&cr after tResults
end repeat
delete last char of tResults

Hope it helps- no time to test out, but the idea is hopefully clear.


_______________________________________________
use-revolution mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to