Respond to clipboard

Hello,

I need such a feature in my application: user copies some text from
any application to the clipboard, my app catches this and reads that
text from the clipboard. I have seen an application with such
facility, so this is posibble, just don't know how to do that because
the program I saw was closed-source. Any ideas? Thanks.

--mjoc

<--------------------===================================-------------------->
          Nu geras!.. Ar matei, kaip atpigo kelioniø draudimas?!
          Ãžiûrëk èia: http://www.jaunimas.lt/anketa/

In <URL:news:local.wxPython> on Fri 15 Aug, Martynas Jocius wrote:

I need such a feature in my application: user copies some text from
any application to the clipboard, my app catches this and reads that
text from the clipboard. I have seen an application with such
facility, so this is posibble, just don't know how to do that because
the program I saw was closed-source. Any ideas? Thanks.

You didn't write which platform you're using. If it is win32:
Your app needs to get the WM_DRAWCLIPBOARD event.

Last year I wrote the application PeerBoard to allow automatic
synchronisation of clipboard contents between multiple networked computers.
Maybe you can use this as a starting point.

In http://www.schwertberger.de/Python-2.3-additions-2003-08-03.zip you
can find this application in two versions. One of these is a
win32 version. It directly uses the win32 api, so I'm not sure whether
this helps you.

Regards,

Dietmar