I have a lot of txt files that I am scanning with fileio. I
want to take chunks of it, dump it as html into a text member and
test for hyperlinks. Rite now i use a repeat loop to test each word
but because of the amount of txt files to scan, I could really use
a command to just test for it first.
You can test for the presence of a series of characters using
http://", tText) then
-- text contains web link
else if offset("https://", tText) then
-- text contains link to a secure site
else if offset("mailto:", tText) then
-- text contains an email link
-- no links of the above types found
You could also use a Regular Expression, but that might serve
follow-up question once you've tried the above
you can use the "hyperlinks" property.
It returns a list of all the ranges of hyperlinks in a chunk
you can then count the number of items in that list or use it
as you want to.
Check out the lingo dictionary for the keyword "hyperlinks".