5

I am looking for a clipboard viewer for OS X which will show all formats that the clipboard is holding the data in. (I.e. something similar to the Clipbook viewer in Windows XP.)

I found a number of programs that show the contents of the clipboard, but I haven't been able to find one which lists all formats available on the clipboard at the moment, and makes it possible to extract either of them. I believe the OS X clipboard can hold the data in multiple formats simultaneously, just like Windows (e.g. in MS Word there's a Paste special... menu item which allows selecting the format to paste).

6

You can see the different types by running the clipboard as record in AppleScript Editor.

the clipboard, the clipboard as text, or Unicode text of (the clipboard as record) will return a plain text version. AppleScript still converts line endings to CR though.

  • 2
    $ osascript -e 'the clipboard as record' | less for a command line one-liner – Robin Nemeth Aug 9 '17 at 11:47
3

The MacOSX developer tools come with an example app called "ClipboardViewer.app" and its source for Xcode. This is by far the most explicit clipboard exploration tool I've found for MacOSX: it shows the string of the clipboard flavour (called UTI on MacOSX) and a hex dump of the content.

Here is an example screenshot made with this app (using a Mathematica source). It would be cool if such a project could be made into an open-source project for MacOSX instead of being a dev-tool-thing. However, there's a public web-page of Apple dev support, where you can download the sample project and compile it using XCode; as of today (late 2018), one needs to let the suggested be applied such as chaning architecture from 32 to 64 bits; after this all compiles well.

example clipboard viewer usage

  • Where exactly can one find the ClipboardViewer.app source code? – tml Jun 28 '18 at 7:20
  • There are links to the source and binary at superuser.com/questions/246714/… – Ian Dunn Sep 18 '18 at 16:45
  • I added the link to the source of clipboard viewer. Thanks @ian-dunn. – Paul Libbrecht Nov 25 '18 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.