Hi James,

Are you looking for something like this?

on mouseUp
   select word clickedWord() of me
end mouseUp

function clickedWord
   put the clickChunk into myChunk
   return number of words of \
   (char 1 to (word 2 of myChunk) of the text of the target)
end clickedWord

Put the mouseUp handler into the script of a field, put the clickedWord function somewhere higher up the message hierarchy or in the same field script.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Benefit from our inexpensive hosting services. See http://economy-x-talk.com/server.html for more info.

On 22 jun 2008, at 20:18, James Hurley wrote:

It's election time and I'm working with election files with lots of lines--thousands.

For reasons I won't go into, I need a function like: ClickWord which will return something like:

Word 2 of line 3 of field 4

It would be something like "ClickLine" only it returns the word number as well. ClickChunk is close but no cigar.

Seems like this would be a natural for RunRev, but I have forgotten how to make the enhancement request.

Anybody? Where is the RunRev web site?

Jim Hurley

P.S.

My kludge of this looks like:

function theClickWord
-- this function returns: word tWordNo of line tLineNo of field tFieldNo
 put the clickLine into tClickLine
 put word 2 of tClickline into tLineNo
 put last word of tClickLine into tFieldNo
 put the value of tClickLine into tLineText
 put the clickText into tWord
 put wordoffset(tWord,tLineText) into tWordNo
 --Just to see how it might look if implemented in RunRev
put "word " & tWordNo & " of line " & tLineNo & " of field "& tFieldNo into msg box
 return tWordNo, tLineNo, tFieldNo
end theClickWord


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to