How to paste text from one app to another using Cocoa?

Posted by Navi Sidhu on Stack Overflow See other posts from Stack Overflow or by Navi Sidhu
Published on 2010-04-21T06:25:21Z Indexed on 2010/04/21 6:33 UTC
Read the original article Hit count: 509

Filed under:
|
|
|
|

I have read about NSPasteBoard in the Apple documentation, and how it allows for applications to write into the PasteBoard and allow other applications to read that text and use it.

Could someone tell me how to paste text from am application (that sits in the status bar) into a NSTextField that is inside a different application.

What I am trying to do is something similar what Snippet and SnippetsApp do.

If I am completely stupid and missed the obvious in Apple Docs, could you please point me to the right path :)

Thanks!

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about nspasteboard