needing help with hyperlinks
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
needing help with hyperlinks
ok so i have to know what line and what number a word is in a paragraph when making it a link, is there any way to figure out what number the word is without manually counting
Re: needing help with hyperlinks
...what number a word is...
hmmm bit confused but..what number the word is...
How about "wordOffset"?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: needing help with hyperlinks
And to forward Simon you could use that function to retrieve the line number:
Credit for this script belong to Craig
Kind regards.
Code: Select all
function retrieveLineNumber tTxt,tString
get the number of lines in char 1 to offset(tString,tTxt) of tTxt
return tTxt -- the line number
end retrieveLineNumber

Kind regards.
Discovering LiveCode Community 6.5.2.
Re: needing help with hyperlinks
This is how we used to have to do it, but with LiveCode 5.5 came the new lineIndex and charIndex functions. Very handy.atout66 wrote:And to forward Simon you could use that function to retrieve the line number:Code: Select all
function retrieveLineNumber tTxt,tString get the number of lines in char 1 to offset(tString,tTxt) of tTxt return tTxt -- the line number end retrieveLineNumber
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com