On Wed, Aug 26, 2009 at 4:09 PM, RobS <[email protected]> wrote:

>
> On Aug 26, 2:45 pm, "Edward K. Ream" <[email protected]> wrote:
> > > 2. I know I can launch a URL from a headline using the @url directive,
> > > but is there a way to do the same in the body text?
> >
> >     import webbrowser
> >     webbrowser.open_new(url)
> >
> > Edward
>
> Awesome, thank you.  What I did with #2 is to assign the script:
> import webbrowser
> url = c.frame.body.bodyCtrl.getSelectedText()
> webbrowser.open_new(url)
>
> to a button, so I can launch an URL by selecting it in the body and
> clicking the button.  Works like a charm.


Yes, this kind of trick is natural.


> Thanks again.


You are welcome.

Edward

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to