I often want to have a brief look at the contents of the system clipboard and was becoming less and less enamoured with pasting the contents into a throwaway document.
This macro displays a "popup" preview of the clipboard's contents. It's activated by pressing and holding down the hotkey (currently set as
⟨Backtick⟩, i.e. ⌃`). Releasing the hotkey closes the preview (most of the time).
Both AppleScripts contain the same content, but differ in which handler they execute:
use application "System Events" property KME : "Keyboard Maestro Engine" property process : a reference to the process named KME script clipboardPreviewWindow property window : a reference to (windows of my process ¬ whose name = "Clipboard Entry") property AXCloseButton : a reference to attribute "AXCloseButton" of my window property button : a reference to value of AXCloseButton on exists my window exists end exists to close perform actions of my button end close end script close the clipboardPreviewWindow
Preview Clipboard.kmmacros (39.1 KB)