Please suggest script
gandalf at doctortimothyMiller.com
Wed Nov 17 12:30:28 CST 2010
I think you might have misunderstood my request. What I want to do is pretty simple. I will manually locate web URLs, and hilite them manually. They are in plain text. Then I want to click a button that will turn the hilited plain-text URL into a clickable link. By "clickable link" I mean I want it to open the URL in my web browser.
get the selectedText
That worked, to my amazement. Cool. Didn't know about RevGoUrl.
OTOH, the docs say revGoUrl is deprecated. I'm not sure what to use instead.
I want the same link to be clickable next time I come across it. I know how to set the textstyle of the selectedText to "link", but that doesn't make it a clickable link.
Hope that's clear.
On Nov 17, 2010, at 10:05 AM, Andre Garzia wrote:
> What you need to do is to loop your fields using a Regular Expression (
> http://www.regular-expressions.info/ ) and MatchChunk to find out what
> chunks are URLs. Then you set the textstyle of those chunks to linktext. On
> the fields you intercept linkclicked and the clicked text will be the urls
> which you will be able to open with RevGoURL.
> Sorry but I can't help you with the RegEx, I am not that good with them and
> I don't have an URL extraction RegEx handy in here. I can try to cook
> something at some later time but right now it is not possible for me.
More information about the use-livecode