FROM : Jim Thomason
DATE : Sat Dec 11 22:00:43 2004
Is there a good way to monitor the clipboard from a background
application? I'd just like to keep track of when the general
pasteboard is changed.
I've come up with a couple of ideas, which I don't really like.
1) have the app looping and constantly polling the clipboard to see if
its changed. This would consume CPU. Probably not a lot, but I'd like
as little as possible.
2) insert a global hotkey to intercept copy and paste and stick it on
the clipboard myself. This seems like I'd be asking for trouble.
Ideally, I'd like the equivalent of the Pasteboard pasting a
"NSPasteBoardDidChange" notification (or something like it) that I
could just monitor and react to. But I don't believe there's anything
actually like that.
I saw something in one of the archives about a carbon function to
intercept these things, but I didn't see a reference as to what it is.
There are apps that do this, so I know it's possible, but I don't know
the best approach.
Any suggestions?
-Jim....
DATE : Sat Dec 11 22:00:43 2004
Is there a good way to monitor the clipboard from a background
application? I'd just like to keep track of when the general
pasteboard is changed.
I've come up with a couple of ideas, which I don't really like.
1) have the app looping and constantly polling the clipboard to see if
its changed. This would consume CPU. Probably not a lot, but I'd like
as little as possible.
2) insert a global hotkey to intercept copy and paste and stick it on
the clipboard myself. This seems like I'd be asking for trouble.
Ideally, I'd like the equivalent of the Pasteboard pasting a
"NSPasteBoardDidChange" notification (or something like it) that I
could just monitor and react to. But I don't believe there's anything
actually like that.
I saw something in one of the archives about a carbon function to
intercept these things, but I didn't see a reference as to what it is.
There are apps that do this, so I know it's possible, but I don't know
the best approach.
Any suggestions?
-Jim....
| Related mails | Author | Date |
|---|---|---|
| Jim Thomason | Dec 11, 22:00 | |
| SD | Dec 13, 03:14 | |
| Jim Thomason | Dec 16, 23:37 | |
| Stefan van den Oor… | Dec 19, 10:01 | |
| David Dunham | Dec 21, 23:29 |






Cocoa mail archive

