AppleScript tip: display clipboard contents in a dialog

By Alvin J. Alexander, devdaily.com

One of the crazy things about AppleScript is how easy it is to get the contents of the clipboard, and then display them in a dialog. Here's an AppleScript program that does just that:

display dialog (the clipboard)

Yep, that's one line of text. Put this in your own ScriptEditor and run it, and you'll see it display the clipboard contents.

Okay, it doesn't work so well when there are graphics in the clipboard, but it works just fine with text. I think that's very cool for one line of text.


devdaily logo