Please suggest script
andre at andregarzia.com
Wed Nov 17 13:05:59 EST 2010
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.
On Wed, Nov 17, 2010 at 3:58 PM, Timothy Miller <
gandalf at doctortimothymiller.com> wrote:
> Sigh... Always the newbie...
> I have a rev stack containing tens of thousands of words of notes, in plain
> text, in various fields, on many cards. I won't bore you with the details.
> Some of these notes include URLs for web sites, in plain text. There are
> hundreds of these.
> I'd like to be able to highlight a web URL, click on a button, and turn the
> text into a clickable link. (We can assume my web browser is already open)
> Is this possible? If so, how? If someone can sketch out what the script
> needs to do, I can probably work out the details.
> I got as far as making a new button, turning off "auto-hilite" and "get the
> selectedText". That works.
> What next?
> Thanks in advance,
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
http://www.andregarzia.com All We Do Is Code.
More information about the Use-livecode