Manipulate the Clipboard in C on Mac OS X
How do you copy text to the clipboard in C or with a Command-Line co开发者_StackOverflowmmand?
pbcopy and pbpaste are your friends on the command line:
echo 'send' | pbcopy
pbpaste > receive.txt
Take a look at the Pasteboard Manager Reference and guide for details on doing this in C.
精彩评论