how to retrive highlighted text in a browser?

Colin J. Williams cjw at sympatico.ca
Sun Jul 3 13:10:45 EDT 2005


wcc wrote:
> Hello group,
> 
> When browsing websites, quite often I have to look up words in
> dictionary.  I'm hoping that I can come up with a python program that
> does the following:
> 
> When I highlight some text in browser and right-click, besides the
> default options such as COPY, PASTE, etc, I want an option that says
> "Send to file", something like that.  The file is a text file, with
> fixed path. When I select this option, the highlighted text will be
> appended to the text file.  This way, I can collect those words &
> phrases that I don't know.
> 
> Is this going to be a difficult task?  I'm a newbie in python. TIA for
> your help.
> 
> - wcc
> 
Firefox doesn't provide the file capture function you seek but, using a 
readily available extension, does permit dictionary lookup using the 
American Heritage Dictionary - the response comes with copious 
advertising which is not overly intrusive.

Colin W.



More information about the Python-list mailing list