> Could we have something like...
> 
> clickLineChunk() returns: "char w to x of line y of field z" ?
> 
> I have seen many cases where I want to deteremine the poition of a
> clickin a particular line and something like this would be very
> helpful without having to count chars of all the preceeding lines.

This could likely be optimized, but off the top of my head it seems this
might work, yes?:

function ClickLineChunk
  put word 2 of the clickChunk into tStart
  put word 4 of the clickChunk into tEnd
  put value(the clickfield) into tData
  put word 2 of the clickLine into tLine
  put len(line 1 to (tLine-1) of tData)+1 into tOffset
  subtract tOffset from tStart
  subtract tOffset from tEnd
  return "char "&tStart&" to "&tEnd&" of line "&tLine&" of " \
     &the clickfield
end ClickLineChunk


> On the same line: I often miss a clickWord (??), which should return:
> "word 5 of field y".

How about something like:

function ClickWord
  put word 4 of the clickChunk into tEnd
  put value(the clickField) into tData
  return "word "& the number of words of (char 1 to tEnd of tData) \
    &" of "&the clickfield
end ClickWord



-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Multimedia Design and Development for Mac, Windows, UNIX, and the Web
 _____________________________________________________________________
 [EMAIL PROTECTED]                 http://www.FourthWorld.com
 Tel: 323-225-3717           ICQ#60248349            Fax: 323-225-0716



Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to