On 10.04.2012 at 10:06 Uhr +0900 Nicolas Cueto apparently wrote:
 > The 'lineOffset' function will be your friend here...

If only it truly were that simple...

In my example, lineOffset would return "3" for "is". But "5" is what I'm after.

--
Nicolas Cueto


untested but something along this should work:

function lineContainsExactMatch pWord,pText
  set the wholematches to true
replace slash with tab in pText -- so we can search for was or were in was/were
  return the number of lines of (item 1 to itemOffset(pWord, pText) of pText)
end lineContainsExactMatch

Robert

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to