Updating visited of linked text

J. Landman Gay jacque at hyperactivesw.com
Wed Jun 18 22:12:00 EDT 2003


On 6/18/03 5:16 PM, Dar Scott wrote:

> I'm using the link style in many fields.  These point to cards.  The 
> link is visited when clicked, but I also want to mark them visited if 
> the user navigates to the cards in any other way such as clicking 
> buttons or clicking other linked text.
> 
> I think I want to mark links in a field as visited if they are in a 
> list.  Is there an easy way to do that?
> 
> I can't think of a way to get all the links in a field except to run 
> through the field character by character.  I thought of htmlText, but 
> that doesn't seem to show visited.
> 
> Ideas?

One way might be to set a custom property on each card which would 
contain the list field's link text for that card. Then in the stack or 
background group, use an opencard handler that does something like:

put the cLinkText of this cd into theLink
put offset(theLink,fld "myLinkList") into theFound
if theFound > 0 then
   set the textstyle of char theFound to len(theLink) \
      of fld "myLinkList" to the linkVisitedColor
end if

Not tested, but hopefully that's the idea. You could use lineOffset 
instead, if it works better for what you're doing.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list